瀏覽代碼

base ierc20 token decimals

龚成明 2 年之前
父節點
當前提交
9b10db399d
共有 1 個文件被更改,包括 1 次插入1 次删除
  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