Skip to content

Commit

Permalink
fixed oracle numeric type conversion bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ttblack committed Nov 8, 2021
1 parent e5605c3 commit 71f55aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions oracle/getblklogs.js
Expand Up @@ -53,8 +53,8 @@ module.exports = async function (json_data, res) {
console.log("params", params);

if (txreceipt.status) {
let crosschainamount = String(common.retnum(log["returnValues"]["_crosschainamount"] / 1e18));
let outputamount = String(common.retnum(log["returnValues"]["_amount"] / 1e18));
let crosschainamount = String(common.retnum(common.web3.utils.fromWei(log["returnValues"]["_crosschainamount"])));
let outputamount = String(common.retnum(common.web3.utils.fromWei(log["returnValues"]["_amount"])));
console.log("crosschainamount", crosschainamount);
console.log("outputamount", outputamount);
txlog["crosschainassets"].push({
Expand Down

0 comments on commit 71f55aa

Please sign in to comment.