h-agent-swap 1.1.6 → 1.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/swap-router.js +3 -1
package/package.json
CHANGED
package/src/swap-router.js
CHANGED
|
@@ -114,7 +114,9 @@ class SwapRouter extends HI {
|
|
|
114
114
|
})
|
|
115
115
|
let pair = await factory.getPair({ token0,token1 })
|
|
116
116
|
let token = new HERC20({ ...this.network, contract: pair })
|
|
117
|
-
|
|
117
|
+
|
|
118
|
+
let liquidityAmount = await token.fromAmount(liquidity)
|
|
119
|
+
await token.tradeApprove(this.contract,liquidityAmount)
|
|
118
120
|
|
|
119
121
|
let result = await this.manage("removeLiquidity", [
|
|
120
122
|
token0,
|