h-agent-swap 1.9.8 → 2.0.0
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/agent-swap.js +3 -1
package/package.json
CHANGED
package/src/agent-swap.js
CHANGED
|
@@ -366,8 +366,10 @@ class AgentSwap extends HI {
|
|
|
366
366
|
} else {
|
|
367
367
|
inAmount = await this.computeAmount({ amount,path,side,point,format:true })
|
|
368
368
|
outAmount = await OToken.toAmount(amount)
|
|
369
|
+
inputAmount = await IToken.toAmount(amount)
|
|
369
370
|
}
|
|
370
371
|
let user = this.web3.eth.defaultAccount
|
|
372
|
+
console.log([inToken,outToken,path,inputAmount,outAmount,user])
|
|
371
373
|
let result = await this.SC.methods.fundRead(inToken,outToken,path,inputAmount,outAmount,user).call()
|
|
372
374
|
console.log(result)
|
|
373
375
|
|
|
@@ -378,7 +380,7 @@ class AgentSwap extends HI {
|
|
|
378
380
|
result.backAmount = toSmall(result.group.backAmount,decimals)
|
|
379
381
|
result.buyAmount = toSmall(result.group.buyAmount,decimals)
|
|
380
382
|
result.change = toSmall(result.group.change,decimals)
|
|
381
|
-
result.win =
|
|
383
|
+
result.win = result.group.win
|
|
382
384
|
|
|
383
385
|
result.feeRate = division(result.config.feeRate,this.pointMax)
|
|
384
386
|
result.reward = division(result.config.reward,this.pointMax)
|