Skip to content

Commit 64ea9af

Browse files
fix: correctly set the dollar value sign (#82)
1 parent 043ee0d commit 64ea9af

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/utils/coinFormatter.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,6 @@ export const formatFiat = (amount: BN) => {
5252
};
5353

5454
export const formatFiatUI = (amount: number) => {
55-
return isNaN(amount) ? amount : '$' + amount;
55+
const _amount = String(amount).replace(/,/g, '');
56+
return isNaN(Number(_amount)) ? amount : '$' + amount;
5657
};

0 commit comments

Comments
 (0)