Skip to content

Commit

Permalink
chore: ternary condition if decimals is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
wainola committed Feb 27, 2024
1 parent febe6b4 commit 0768233
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/Helpers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export const getFormatedFee = (fee: Transfer["fee"]): string => {
resource: { decimals },
tokenSymbol,
} = fee
formatedFee = `${ethers.formatUnits(fee.amount, decimals).toString()} ${tokenSymbol.toUpperCase()}`
formatedFee = `${ethers.formatUnits(fee.amount, decimals !== 0 ? decimals : 18).toString()} ${tokenSymbol.toUpperCase()}`
}

return formatedFee
Expand Down

0 comments on commit 0768233

Please sign in to comment.