h-agent-swap 2.1.0 → 2.1.2

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": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "description": "agent-swap",
5
5
  "main": "src/index.js",
6
6
  "files": [
package/src/agent-swap.js CHANGED
@@ -137,15 +137,15 @@ ${JSON.stringify(data,null,2)}
137
137
  data.taxAmount = multiplication(data.change,tax.tax)
138
138
  }
139
139
  data.buyType = 0
140
- data.realOutAmount = reduce(reduce(data.outAmount,data.buyAmount),data.taxAmount)
140
+ data.realOutAmount = reduce(reduce(outAmount,data.buyAmount),data.taxAmount)
141
141
  }else {
142
142
  // data.realOutAmount = outAmount
143
143
  data.buyAmount = multiplication(outAmount,tax.backBuy)
144
- data.realOutAmount = reduce(data.outAmount,data.buyAmount)
144
+ data.realOutAmount = reduce(outAmount,data.buyAmount)
145
145
  }
146
146
  }else {
147
147
  data.buyAmount = multiplication(outAmount,tax.backBuy)
148
- data.realOutAmount = reduce(data.outAmount,data.buyAmount)
148
+ data.realOutAmount = reduce(outAmount,data.buyAmount)
149
149
  if(parseFloat(limit.outMin) <= parseFloat(data.change) && parseFloat(data.change) > 0) {
150
150
  data.backAmount = data.change
151
151
  }