warn that a bip353 name resolved to a silent payment address for a different network on the send tab and in send to many, rather than reporting it has no address
What changed, and why it matters
This commit improves user-facing error messages in the Sparrow Wallet when a BIP353 human-readable name (like a DNS-based Bitcoin payment alias) resolves to a silent payment address meant for a different Bitcoin network (for example, testnet instead of mainnet). Previously, the wallet incorrectly told the user that no address was found. Now it clearly warns that the address belongs to a different network. This is a defensive fix that helps prevent users from accidentally sending funds to an incompatible address or being confused by misleading error text.
No immediate action required beyond normal review and release. The change is a low-risk UX improvement. If releasing, consider mentioning in release notes that BIP353 resolution now provides clearer network-mismatch warnings.
Security signals we found
BIP353 DNS payment resolution
silent payment address network mismatch
user-facing warning improvement
submodule bump for supporting API
Evidence from the diff
The patch adds explicit handling for the case where a DnsPayment has a silent payment address for a network other than the one currently in use. In PaymentController, instead of falling through to the ‘no address’ warning, it now shows a specific ‘Different Network’ warning dialog and returns early. In SendToManyDialog, it throws an IllegalArgumentException with a clear message. The drongo submodule is also bumped, likely to pick up the new hasOtherNetworkSilentPaymentAddress() API in the underlying library. The change is purely diagnostic/UX and does not alter address validation or transaction construction logic.
Changed components
src/main/java/com/sparrowwallet/sparrow/control/SendToManyDialog.javasrc/main/java/com/sparrowwallet/sparrow/wallet/PaymentController.javadrongo submoduleInspect captured patch +6 / −1
### drongo
@@ -1 +1 @@
-Subproject commit 1337b24641de1950c1544174a9587ed9a410315a
+Subproject commit c1d7df3b64e6cdd3b6c11ab1be3e7505486804e1
### src/main/java/com/sparrowwallet/sparrow/control/SendToManyDialog.java
@@ -645,6 +645,8 @@ private static Payment getPayment(Wallet wallet, DnsPayment dnsPayment, String l
return new SilentPayment(dnsPayment.bitcoinURI().getSilentPaymentAddress(), label, value, sendMax);
} else if(dnsPayment.hasAddress()) {
return new Payment(dnsPayment.bitcoinURI().getAddress(), label, value, sendMax);
+ } else if(dnsPayment.hasOtherNetworkSilentPaymentAddress()) {
+ throw new IllegalArgumentException("Payment to " + dnsPayment + " contains a silent payment address for a different network.");
} else {
throw new IllegalArgumentException("Payment to " + dnsPayment + " has no associated address.");
}
### src/main/java/com/sparrowwallet/sparrow/wallet/PaymentController.java
@@ -437,6 +437,9 @@ public void setDnsPayment(DnsPayment dnsPayment) {
setSilentPaymentAddress(dnsPayment.bitcoinURI().getSilentPaymentAddress());
} else if(dnsPayment.hasAddress()) {
DnsPaymentCache.putDnsPayment(dnsPayment.bitcoinURI().getAddress(), dnsPayment);
+ } else if(dnsPayment.hasOtherNetworkSilentPaymentAddress()) {
+ AppServices.showWarningDialog("Different Network", "The DNS payment instruction for " + dnsPayment.hrn() + " resolved correctly but contains a silent payment address for a different network.");
+ return;
} else {
AppServices.showWarningDialog("No Address Provided", "The DNS payment instruction for " + dnsPayment.hrn() + " resolved correctly but did not contain a bitcoin address.");
return;Why this scored 34/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.