Parcourir la source

base ierc20 token decimals

龚成明 il y a 2 ans
Parent
commit
9b10db399d
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      scripts/one-pro.js

+ 1 - 1
scripts/one-pro.js

@@ -158,7 +158,7 @@ const priceHandler = async function(context, task) {
     const fromIerc20Token = config.baseIerc20Token
     const amount = config.baseTokenAmount
 
-    const OneInchPrice = NumKit.getSubFloat(await OneInch.price(fromIerc20Token.contract, tokenHash, amount), priceTick)
+    const OneInchPrice = NumKit.getSubFloat(await OneInch.price(fromIerc20Token.contract, tokenHash, amount, fromIerc20Token.decimals), priceTick)
     const BinancePrice = NumKit.getSubFloat(await BinanceSpot.realPrice(toToken.exchange.pair), priceTick)
 
     toToken.OneInchPrice = OneInchPrice