Sfoglia il codice sorgente

base ierc20 token decimals

龚成明 2 anni fa
parent
commit
9b10db399d
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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