fix ui edge cases (#3109)

* wrap navbar in observer to account for disabling pages

* always display fiat amount with 2 decimals on confirm sheet

* don't show limit popup if max limit is 0 (this signifies the providers didn't load yet)

* fix deposit amount getting set to "ALL" in race condition

* disable showing hardware wallets on l2 wallet selector

* fix reset in account customizer if designs weren't loaded properly

* add withDecimals string extension

* add fallback on failed display amount parse
This commit is contained in:
malik1004x
2026-03-18 22:34:02 +01:00
committed by GitHub
parent 410c496bfc
commit 24cceb5795
8 changed files with 151 additions and 109 deletions
+20
View File
@@ -17,6 +17,26 @@ extension MaxDecimals on String {
return parts.join(".");
}
String withDecimals(int decimals) {
var parts = split(".");
if (parts.length > 2) {
parts = [parts.first, parts.sublist(1).join("")];
}
if (parts.length == 1) {
parts.add("");
}
if (parts[1].length > decimals) {
parts[1] = parts[1].substring(0, decimals);
} else {
parts[1] = parts[1].padRight(decimals, '0');
}
return parts.join(".");
}
/// Format a stringified number to a localized representation
/// 1.000.000,00 in de_DE