Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ jobs:
api-level: [ 29 ]

steps:
- name: Fix github actions messing up $HOME...
run: "echo HOME=/root | sudo tee -a $GITHUB_ENV"
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}

- name: configure git
run: |
git config --global --add safe.directory '*'
Expand Down
11 changes: 6 additions & 5 deletions cw_core/lib/wallet_addresses.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,12 @@ abstract class WalletAddresses {
Future<void> saveAddressesInBox() async {
try {
walletInfo.address = address;
walletInfo.setAddresses(addressesMap);
walletInfo.setAddressInfos(addressInfos);
walletInfo.setUsedAddresses(usedAddresses.toList());
walletInfo.setHiddenAddresses(hiddenAddresses.toList());
walletInfo.setManualAddresses(manualAddresses.toList());
// TODO: check if it will affect the performance of each wallet
Comment thread
MrCyjaneK marked this conversation as resolved.
await walletInfo.setAddresses(addressesMap);
await walletInfo.setAddressInfos(addressInfos);
await walletInfo.setUsedAddresses(usedAddresses.toList());
await walletInfo.setHiddenAddresses(hiddenAddresses.toList());
await walletInfo.setManualAddresses(manualAddresses.toList());

await walletInfo.save();
} catch (e) {
Expand Down
8 changes: 3 additions & 5 deletions cw_core/lib/wallet_info.dart
Original file line number Diff line number Diff line change
Expand Up @@ -428,11 +428,9 @@ class WalletInfo {

Future<void> setAddresses(Map<String, String> addresses) async {
await WalletInfoAddressMap.deleteByWalletInfoId(internalId);
final keys = addresses.keys.toList();
final values = addresses.values.toList();
// ToDo: check why the addresses list gets changed half way through
for (int i = 0; i < keys.length; i++) {
await WalletInfoAddressMap.insert(internalId, keys[i], values[i]);
final entries = addresses.entries.toList();
for (final entry in entries) {
await WalletInfoAddressMap.insert(internalId, entry.key, entry.value);
}
}

Expand Down
1 change: 1 addition & 0 deletions lib/utils/exception_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ class ExceptionHandler {
"Connection timed out",
"Connection reset by peer",
"Connection closed before full header was received",
"Connection closed while receiving data",
"Connection terminated during handshake",
"OS Error: Connection refused, errno = 61",
"PERMISSION_NOT_GRANTED",
Expand Down
Loading