duplicate index error fix

This commit is contained in:
julian 2023-10-18 10:56:20 -06:00
parent 72c045a8fc
commit e771fb383c

View file

@ -249,7 +249,7 @@ class BitcoinCashWallet extends CoinServiceAPI
DerivePathTypeExt.primaryFor(coin),
);
nextIndex++;
await db.putAddress(address);
await db.updateOrPutAddresses([address]);
// check if it has been used before adding
if (await _isUnused(address.value)) {