minor fixes

Omar committed Jul 5, 2026 at 02:34 UTC 00b7d7ce0d59e43d6f887cbb5e11217a23e130e8
3 files changed +11 -2
cw_bitcoin/lib/lightning/lightning_wallet.dart
+3 -1
@@ -123,7 +123,9 @@ class LightningWallet {
123
124 Future<void> close() async {
125 _eventSubscription?.cancel();
126 - await _sdk?.disconnect();
126 + try {
127 + await _sdk?.disconnect();
128 + } catch (_) {}
129 _logSubscription?.cancel();
130 }
131
cw_core/lib/parse_fixed.dart
+7
@@ -29,6 +29,13 @@ BigInt? tryParseFixed(String value, int decimals) {
29 BigInt parseFixed(String value, int decimals) {
30 final multiplier = getMultiplier(decimals);
31
32 + /// handle weird cases where users enter spaces and currency after the amount
33 + /// This should be handled from UI field to prevent non numerical values
34 + /// but will be in the refactoring
35 + if (value.contains(" ")) {
36 + value = value.split(" ").first;
37 + }
38 +
39 final negative = value.startsWith("-");
40 if (negative) value = value.substring(1);
41
res/values/strings_it.arb
+1 -1
@@ -166,7 +166,7 @@
166 "centralized": "Centralizzato",
167 "chain_id": "ID catena",
168 "chains": "Chain",
169 - "change": "Resto",
169 + "change": "Cambia",
170 "change_backup_password_alert": "I tuoi file di backup precedenti non potranno essere importati con la nuova password di backup. La nuova password di backup verrà usata solo per i nuovi file di backup. Sei sicuro di voler cambiare la password di backup?",
171 "change_currency": "Cambia valuta",
172 "change_current_node": "Sei sicuro di voler cambiare il nodo corrente in ${node}?",