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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "h-agent-swap",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "description": "agent-swap",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -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
- await token.tradeApprove(this.contract,liquidity)
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,