safer to format wei as string

master
lza_menace 2 years ago
parent 9141810749
commit a364b0d21c

@ -272,7 +272,7 @@ class Scrape extends Collection {
} }
} }
if (sale) { if (sale) {
let amountEther = ethers.utils.formatEther(amountWei); let amountEther = ethers.utils.formatEther(amountWei.toString());
let msg = `[ ${timestamp.toISOString()} ][ ${this.contractName} ][ sale ] #${tokenId}: ${fromAddress} => ${toAddress} for ${amountEther}Ξ (${platform}) in tx ${txHash}:${logIndex}\n`; let msg = `[ ${timestamp.toISOString()} ][ ${this.contractName} ][ sale ] #${tokenId}: ${fromAddress} => ${toAddress} for ${amountEther}Ξ (${platform}) in tx ${txHash}:${logIndex}\n`;
console.log(msg); console.log(msg);
const q = { const q = {

Loading…
Cancel
Save