mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 18:03:12 +01:00
Add issuedReceiveAddresses to AddressEntryList at wallet restore #1288
This commit is contained in:
parent
020a333db1
commit
da16a8169c
@ -100,6 +100,15 @@ public final class AddressEntryList implements PersistableEnvelope, PersistedDat
|
||||
} else {
|
||||
list = new ArrayList<>();
|
||||
add(new AddressEntry(wallet.freshReceiveKey(), AddressEntry.Context.ARBITRATOR));
|
||||
|
||||
// In case we restore from seed words and have balance we need to add the relevant addresses to our list:
|
||||
if (wallet.getBalance().isPositive()) {
|
||||
wallet.getIssuedReceiveAddresses().forEach(address -> {
|
||||
log.info("Create AddressEntry for address={}", address);
|
||||
add(new AddressEntry((DeterministicKey) wallet.findKeyFromPubHash(address.getHash160()), AddressEntry.Context.AVAILABLE));
|
||||
});
|
||||
}
|
||||
|
||||
persist();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user