warn that a bip353 record placed a silent payment address under the wrong network parameter on the send tab and in send to many
What changed, and why it matters
This commit adds user-facing warnings when a BIP353 DNS-based payment record puts a silent payment address under the wrong network parameter. Previously, such a misconfigured record may have been silently ignored or handled like a normal address mismatch. Now Sparrow explicitly tells the user the record is set incorrectly, helping prevent accidental sends to the wrong Bitcoin network (for example, sending testnet coins to a mainnet address or vice versa).
Review the drongo submodule diff (cdd077e792f8ced008f76c43d7761d5969ff5fcd) to confirm the detection logic for hasMisplacedSilentPaymentAddress() is robust and cannot be bypassed. Ensure the warning/error paths cannot be ignored by automated send-to-many imports. Consider whether the same validation is needed elsewhere that resolves BIP353 records.
Security signals we found
BIP353 DNS payment record parsing
silent payment address network mismatch
wrong network parameter handling
user warning for misconfigured DNS payment instruction
defensive validation in send workflow
Evidence from the diff
The patch updates the drongo submodule and modifies two UI controllers. In SendToManyDialog, a new branch checks dnsPayment.hasMisplacedSilentPaymentAddress() and throws IllegalArgumentException with a descriptive message. In PaymentController, the same condition triggers a warning dialog and returns early. The change distinguishes a ‘misplaced’ silent payment address (present but stored under the wrong network parameter) from an ‘other network’ silent payment address. The drongo submodule bump presumably adds the hasMisplacedSilentPaymentAddress() API and its detection logic.
Changed components
drongo submodulesrc/main/java/com/sparrowwallet/sparrow/control/SendToManyDialog.javasrc/main/java/com/sparrowwallet/sparrow/wallet/PaymentController.javaInspect captured patch +6 / −1
### drongo
@@ -1 +1 @@
-Subproject commit c1d7df3b64e6cdd3b6c11ab1be3e7505486804e1
+Subproject commit cdd077e792f8ced008f76c43d7761d5969ff5fcd
### 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.hasMisplacedSilentPaymentAddress()) {
+ throw new IllegalArgumentException("Payment to " + dnsPayment + " is set incorrectly, placing its silent payment address under the parameter for a different network.");
} else if(dnsPayment.hasOtherNetworkSilentPaymentAddress()) {
throw new IllegalArgumentException("Payment to " + dnsPayment + " contains a silent payment address for a different network.");
} else {
### 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.hasMisplacedSilentPaymentAddress()) {
+ AppServices.showWarningDialog("Incorrect DNS Record", "The DNS payment instruction for " + dnsPayment.hrn() + " resolved correctly but is set incorrectly, placing its silent payment address under the parameter for a different network.");
+ return;
} 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;Why this scored 36/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.