await wallet address saving (#3393)
minor CI fix
Omar Hatem committed
Jul 14, 2026 at 15:09 UTC
bfc2c5ee2350b836baa74772b0282e42c6fd22fb
4 files changed
+16
-10
.github/workflows/lint.yml
+6
@@ -32,6 +32,12 @@ jobs:
32
api-level: [ 29 ]
33
34
steps:
35
+ - name: Fix github actions messing up $HOME...
36
+ run: "echo HOME=/root | sudo tee -a $GITHUB_ENV"
37
+ - uses: actions/checkout@v4
38
+ with:
39
+ ref: ${{ inputs.ref }}
40
+
41
- name: configure git
42
run: |
43
git config --global --add safe.directory '*'
cw_core/lib/wallet_addresses.dart
+6
-5
@@ -71,11 +71,12 @@ abstract class WalletAddresses {
71
Future<void> saveAddressesInBox() async {
72
try {
73
walletInfo.address = address;
74
- walletInfo.setAddresses(addressesMap);
75
- walletInfo.setAddressInfos(addressInfos);
76
- walletInfo.setUsedAddresses(usedAddresses.toList());
77
- walletInfo.setHiddenAddresses(hiddenAddresses.toList());
78
- walletInfo.setManualAddresses(manualAddresses.toList());
74
+ // TODO: check if it will affect the performance of each wallet
75
+ await walletInfo.setAddresses(addressesMap);
76
+ await walletInfo.setAddressInfos(addressInfos);
77
+ await walletInfo.setUsedAddresses(usedAddresses.toList());
78
+ await walletInfo.setHiddenAddresses(hiddenAddresses.toList());
79
+ await walletInfo.setManualAddresses(manualAddresses.toList());
80
81
await walletInfo.save();
82
} catch (e) {
cw_core/lib/wallet_info.dart
+3
-5
@@ -428,11 +428,9 @@ class WalletInfo {
428
429
Future<void> setAddresses(Map<String, String> addresses) async {
430
await WalletInfoAddressMap.deleteByWalletInfoId(internalId);
431
- final keys = addresses.keys.toList();
432
- final values = addresses.values.toList();
433
- // ToDo: check why the addresses list gets changed half way through
434
- for (int i = 0; i < keys.length; i++) {
435
- await WalletInfoAddressMap.insert(internalId, keys[i], values[i]);
431
+ final entries = addresses.entries.toList();
432
+ for (final entry in entries) {
433
+ await WalletInfoAddressMap.insert(internalId, entry.key, entry.value);
434
}
435
}
436
lib/utils/exception_handler.dart
+1
@@ -258,6 +258,7 @@ class ExceptionHandler {
258
"Connection timed out",
259
"Connection reset by peer",
260
"Connection closed before full header was received",
261
+ "Connection closed while receiving data",
262
"Connection terminated during handshake",
263
"OS Error: Connection refused, errno = 61",
264
"PERMISSION_NOT_GRANTED",