diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/PaymentController.java b/src/main/java/com/sparrowwallet/sparrow/wallet/PaymentController.java index 4ca6c8b2..7365607c 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/PaymentController.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/PaymentController.java @@ -278,7 +278,9 @@ public class PaymentController extends WalletFormController implements Initializ public void setPayment(Payment payment) { if(getRecipientValueSats() == null || payment.getAmount() != getRecipientValueSats()) { - address.setText(payment.getAddress().toString()); + if(payment.getAddress() != null) { + address.setText(payment.getAddress().toString()); + } if(payment.getLabel() != null && !label.getText().equals(payment.getLabel())) { label.setText(payment.getLabel()); } diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/SendController.java b/src/main/java/com/sparrowwallet/sparrow/wallet/SendController.java index 45389a1d..01370345 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/SendController.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/SendController.java @@ -1063,6 +1063,9 @@ public class SendController extends WalletFormController implements Initializabl if(event.getPayments() != null) { clear(null); setPayments(event.getPayments()); + } else if(paymentTabs.getTabs().size() == 1) { + Payment payment = new Payment(null, null, event.getUtxos().stream().mapToLong(BlockTransactionHashIndex::getValue).sum(), true); + setPayments(List.of(payment)); } if(event.getFee() != null) {