From 0768233ffb8e70ea6288a500ae7ec68b89c4a077 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Riquelme=20Guzm=C3=A1n?= Date: Tue, 27 Feb 2024 12:55:09 -0300 Subject: [PATCH] chore: ternary condition if decimals is 0 --- src/utils/Helpers.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/Helpers.tsx b/src/utils/Helpers.tsx index 11e6a51..3d78c7b 100644 --- a/src/utils/Helpers.tsx +++ b/src/utils/Helpers.tsx @@ -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