From 3a0aac4393305938cafe10f1df867e634b134ea2 Mon Sep 17 00:00:00 2001
From: Yash094 <67926590+Yash094@users.noreply.github.com>
Date: Fri, 7 Nov 2025 07:36:09 +0000
Subject: [PATCH] Change TransactionWidget fiat decimals to two (#8366)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
[Slack Thread](https://thirdwebdev.slack.com/archives/C09DS2CKGP2/p1762414792059159?thread_ts=1762414792.059159&cid=C09DS2CKGP2)
---
## PR-Codex overview
This PR focuses on modifying the formatting of token balances in the `formatTokenBalance.ts` file to limit the maximum number of fraction digits displayed.
### Detailed summary
- Changed `maximumFractionDigits` from `5` to `2` in the currency formatting options.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
## Summary by CodeRabbit
* **Bug Fixes**
* Updated currency formatting to display a maximum of 2 decimal places instead of 5, improving readability and consistency of financial amounts throughout the app while maintaining appropriate minimum precision.
---
.../react/web/ui/ConnectWallet/screens/formatTokenBalance.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/thirdweb/src/react/web/ui/ConnectWallet/screens/formatTokenBalance.ts b/packages/thirdweb/src/react/web/ui/ConnectWallet/screens/formatTokenBalance.ts
index 229d16da968..2934f0f5611 100644
--- a/packages/thirdweb/src/react/web/ui/ConnectWallet/screens/formatTokenBalance.ts
+++ b/packages/thirdweb/src/react/web/ui/ConnectWallet/screens/formatTokenBalance.ts
@@ -49,7 +49,7 @@ function formatMoney(
return new Intl.NumberFormat(locale, {
style: "currency",
currency: currencyCode,
- maximumFractionDigits: 5,
+ maximumFractionDigits: 2,
minimumFractionDigits: 0,
}).format(value);
}