Skip to content

Commit

Permalink
add a default value for undefined token decimals
Browse files Browse the repository at this point in the history
  • Loading branch information
hichri-louay committed Nov 15, 2023
1 parent 4481e97 commit f01e8f8
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 f01e8f8

Please sign in to comment.