Skip to content

Commit 52cbcd2

Browse files
authored
[Pay] Fix: fix fiat value to 2 decimals (#6243)
1 parent 387891d commit 52cbcd2

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.changeset/tender-frogs-change.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Fix PayEmbed fiat values to 2 decimal places

packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/FiatValue.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ export function FiatValue(
4242
}
4343

4444
return cryptoToFiatQuery.data?.result ? (
45-
<Text {...props}>${formatNumber(cryptoToFiatQuery.data.result, 2)}</Text>
45+
<Text {...props}>
46+
${formatNumber(cryptoToFiatQuery.data.result, 2).toFixed(2)}
47+
</Text>
4648
) : null;
4749
}

0 commit comments

Comments
 (0)