mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-04-17 19:51:58 +00:00
delete by wallet id
This commit is contained in:
parent
72bcc97463
commit
cd50b64683
2 changed files with 7 additions and 7 deletions
lib
|
@ -142,7 +142,7 @@ class Wallets {
|
|||
}
|
||||
|
||||
await mainDB.isar.writeTxn(() async {
|
||||
await mainDB.isar.walletInfo.deleteAllByWalletId([walletId]);
|
||||
await mainDB.isar.walletInfo.deleteByWalletId(walletId);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ class WalletInfo implements IsarId {
|
|||
cachedBalanceString: newEncoded,
|
||||
);
|
||||
await isar.writeTxn(() async {
|
||||
await isar.walletInfo.delete(id);
|
||||
await isar.walletInfo.deleteByWalletId(walletId);
|
||||
await isar.walletInfo.put(updated);
|
||||
});
|
||||
}
|
||||
|
@ -136,7 +136,7 @@ class WalletInfo implements IsarId {
|
|||
cachedChainHeight: newHeight,
|
||||
);
|
||||
await isar.writeTxn(() async {
|
||||
await isar.walletInfo.delete(id);
|
||||
await isar.walletInfo.deleteByWalletId(walletId);
|
||||
await isar.walletInfo.put(updated);
|
||||
});
|
||||
}
|
||||
|
@ -170,7 +170,7 @@ class WalletInfo implements IsarId {
|
|||
favouriteOrderIndex: index,
|
||||
);
|
||||
await isar.writeTxn(() async {
|
||||
await isar.walletInfo.delete(id);
|
||||
await isar.walletInfo.deleteByWalletId(walletId);
|
||||
await isar.walletInfo.put(updated);
|
||||
});
|
||||
}
|
||||
|
@ -192,7 +192,7 @@ class WalletInfo implements IsarId {
|
|||
name: newName,
|
||||
);
|
||||
await isar.writeTxn(() async {
|
||||
await isar.walletInfo.delete(id);
|
||||
await isar.walletInfo.deleteByWalletId(walletId);
|
||||
await isar.walletInfo.put(updated);
|
||||
});
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ class WalletInfo implements IsarId {
|
|||
cachedReceivingAddress: newAddress,
|
||||
);
|
||||
await isar.writeTxn(() async {
|
||||
await isar.walletInfo.delete(id);
|
||||
await isar.walletInfo.deleteByWalletId(walletId);
|
||||
await isar.walletInfo.put(updated);
|
||||
});
|
||||
}
|
||||
|
@ -225,7 +225,7 @@ class WalletInfo implements IsarId {
|
|||
isMnemonicVerified: true,
|
||||
);
|
||||
await isar.writeTxn(() async {
|
||||
await isar.walletInfo.delete(id);
|
||||
await isar.walletInfo.deleteByWalletId(walletId);
|
||||
await isar.walletInfo.put(updated);
|
||||
});
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue