Skip to content

Commit 7b6f68a

Browse files
author
Egor Komarov
committed
fix(EWM-374): adjust money formatting thresholds for improved accuracy
1 parent 62c3c83 commit 7b6f68a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

lib/feature/wallet/widgets/token_transfer_info/token_transfer_info_widget.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ class TokenTransferInfoWidget
109109
amount: amount,
110110
icon: icon,
111111
includeSymbol: false,
112+
useDefaultFormat: false,
112113
);
113114
},
114115
),

packages/ui_components_lib/lib/utils/utils.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ extension MoneyFormat on Money {
7878
);
7979
}
8080

81-
if (d < 1) {
81+
if (d < 0.00000001) {
82+
return formatImproved(pattern: _moneyPattern(decimalDigits));
83+
} else if (d < 1) {
8284
return formatImproved(pattern: _moneyPattern(8));
8385
} else if (d < 1000) {
8486
return formatImproved(pattern: _moneyPattern(4));

0 commit comments

Comments
 (0)