From 30001051c7971e1f090edcb254beeeb462696eb5 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Mon, 22 Jan 2024 09:12:00 +0200 Subject: [PATCH] avoid null labels when broadcasting a loaded transaction with no name --- drongo | 2 +- .../sparrowwallet/sparrow/transaction/HeadersController.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drongo b/drongo index 42f279e5..a436de31 160000 --- a/drongo +++ b/drongo @@ -1 +1 @@ -Subproject commit 42f279e5e7cfdcf0de80f60f65857d26db8580ad +Subproject commit a436de319a763c36e3a8944af77ebf6e267a4084 diff --git a/src/main/java/com/sparrowwallet/sparrow/transaction/HeadersController.java b/src/main/java/com/sparrowwallet/sparrow/transaction/HeadersController.java index 1eaba12e..a59018a4 100644 --- a/src/main/java/com/sparrowwallet/sparrow/transaction/HeadersController.java +++ b/src/main/java/com/sparrowwallet/sparrow/transaction/HeadersController.java @@ -1580,7 +1580,7 @@ public class HeadersController extends TransactionFormController implements Init output.setLabel(label + (walletNode.getKeyPurpose() == KeyPurpose.CHANGE ? (walletNode.getWallet().isBip47() ? " (sent)" : " (change)") : " (received)")); changedLabelEntries.add(new HashIndexEntry(event.getWallet(), output, HashIndexEntry.Type.OUTPUT, walletNode.getKeyPurpose())); } - if(output.getSpentBy() != null && output.getSpentBy().getHash().equals(txid) && output.getSpentBy().getLabel() == null) { //The norm - sending out + if(output.getSpentBy() != null && output.getSpentBy().getHash().equals(txid) && output.getSpentBy().getLabel() == null && headersForm.getName() != null) { //The norm - sending out output.getSpentBy().setLabel(headersForm.getName() + " (input)"); changedLabelEntries.add(new HashIndexEntry(event.getWallet(), output.getSpentBy(), HashIndexEntry.Type.INPUT, walletNode.getKeyPurpose())); }