mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2025-01-26 02:11:10 +00:00
skip labelled addresses when retrieving an unused address from the receive tab and send tab pay to wallet
This commit is contained in:
parent
617ad380c0
commit
2d3bf0b2fe
2 changed files with 4 additions and 1 deletions
|
@ -177,7 +177,7 @@ public class PaymentController extends WalletFormController implements Initializ
|
|||
List<Address> existingAddresses = getOtherAddresses();
|
||||
WalletNode freshNode = newValue.getFreshNode(KeyPurpose.RECEIVE);
|
||||
Address freshAddress = freshNode.getAddress();
|
||||
while(existingAddresses.contains(freshAddress)) {
|
||||
while(existingAddresses.contains(freshAddress) || (freshNode.getLabel() != null && !freshNode.getLabel().isEmpty())) {
|
||||
freshNode = newValue.getFreshNode(KeyPurpose.RECEIVE, freshNode);
|
||||
freshAddress = freshNode.getAddress();
|
||||
}
|
||||
|
|
|
@ -199,6 +199,9 @@ public class ReceiveController extends WalletFormController implements Initializ
|
|||
|
||||
public void refreshAddress() {
|
||||
NodeEntry freshEntry = getWalletForm().getFreshNodeEntry(KeyPurpose.RECEIVE, currentEntry);
|
||||
while(freshEntry.getLabel() != null && !freshEntry.getLabel().isEmpty()) {
|
||||
freshEntry = getWalletForm().getFreshNodeEntry(KeyPurpose.RECEIVE, freshEntry);
|
||||
}
|
||||
setNodeEntry(freshEntry);
|
||||
if(addressQrDialog != null) {
|
||||
addressQrDialog.close();
|
||||
|
|
Loading…
Reference in a new issue