diff --git a/lib/wallets/wallet/intermediate/bip39_hd_wallet.dart b/lib/wallets/wallet/intermediate/bip39_hd_wallet.dart index 2b529e5f9..7bb795016 100644 --- a/lib/wallets/wallet/intermediate/bip39_hd_wallet.dart +++ b/lib/wallets/wallet/intermediate/bip39_hd_wallet.dart @@ -36,7 +36,7 @@ abstract class Bip39HDWallet extends Bip39Wallet derivePathType: DerivePathTypeExt.primaryFor(info.coin), ); - await mainDB.putAddress(address); + await mainDB.updateOrPutAddresses([address]); await info.updateReceivingAddress( newAddress: address.value, isar: mainDB.isar, @@ -58,9 +58,7 @@ abstract class Bip39HDWallet extends Bip39Wallet derivePathType: DerivePathTypeExt.primaryFor(info.coin), ); - await mainDB.isar.writeTxn(() async { - await mainDB.isar.addresses.put(address); - }); + await mainDB.updateOrPutAddresses([address]); } // ========== Subclasses may override ========================================