mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-10 12:44:31 +00:00
isar index violation error fix
This commit is contained in:
parent
ae7163a40f
commit
47acad29a5
1 changed files with 6 additions and 1 deletions
|
@ -306,8 +306,13 @@ mixin PaynymWalletInterface {
|
||||||
derivePathType: DerivePathType.bip44,
|
derivePathType: DerivePathType.bip44,
|
||||||
toPaymentCode: pCode,
|
toPaymentCode: pCode,
|
||||||
);
|
);
|
||||||
await _db.putAddress(address);
|
|
||||||
|
|
||||||
|
final storedAddress = await _db.getAddress(_walletId, address.value);
|
||||||
|
if (storedAddress == null) {
|
||||||
|
await _db.putAddress(address);
|
||||||
|
} else {
|
||||||
|
await _db.updateAddress(storedAddress, address);
|
||||||
|
}
|
||||||
final count = await _getTxCount(address: address.value);
|
final count = await _getTxCount(address: address.value);
|
||||||
// return address if unused, otherwise continue to next index
|
// return address if unused, otherwise continue to next index
|
||||||
if (count == 0) {
|
if (count == 0) {
|
||||||
|
|
Loading…
Reference in a new issue