Skip to content

Commit

Permalink
add a default value for undefined token decimals (#366)
Browse files Browse the repository at this point in the history
  • Loading branch information
hichri-louay authored Nov 15, 2023
2 parents 4481e97 + f01e8f8 commit 00779f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/campaign.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -2761,7 +2761,7 @@ module.exports.campaignsStatistics = async (req, res) => {

const payedAmountInCryptoCurrency = new Big(
link.payedAmount
).div(decimalPower.pow(getDecimal(tokenName)))
).div(decimalPower.pow(getDecimal(tokenName) ?? 18))
const cryptoUnitPriceInUSD = new Big(
Crypto[tokenName].price
)
Expand Down

0 comments on commit 00779f0

Please sign in to comment.