ask before broadcasting a paynym link transaction at a very high fee rate
What changed, and why it matters
This commit adds a confirmation dialog before broadcasting a special Bitcoin transaction used to create a PayNym link. Previously, if the network fee rate was extremely high, the wallet would silently broadcast the transaction and the user could pay unexpectedly large fees. Now the user is warned and must confirm before the broadcast proceeds.
No urgent action required. Users should upgrade to a version containing this commit to benefit from the additional confirmation when broadcasting PayNym link transactions at very high fee rates. Review fee rate settings and transaction previews before broadcasting.
Security signals we found
UI confirmation added before high-fee broadcast
Prevents accidental excessive fee payment for PayNym link transactions
No cryptographic or network vulnerability patched
Evidence from the diff
PayNymController.broadcastNotificationTransaction() now computes walletTransaction.getFeeRate() and compares it against AppServices.getLongFeeRatesRange().getLast(). If the transaction’s fee rate exceeds the top of the configured long-term fee range, a warning dialog is shown with the fee rate formatted in the user’s chosen unit format. The broadcast only proceeds if the user selects YES; otherwise the method returns after refreshing the following list. This is a defensive UX fix to prevent accidental overpayment of transaction fees for notification/link transactions.
Changed components
src/main/java/com/sparrowwallet/sparrow/paynym/PayNymController.javaInspect captured patch +13 / −0
### src/main/java/com/sparrowwallet/sparrow/paynym/PayNymController.java
@@ -11,6 +11,7 @@
import com.sparrowwallet.drongo.psbt.PSBT;
import com.sparrowwallet.drongo.wallet.*;
import com.sparrowwallet.sparrow.AppServices;
+import com.sparrowwallet.sparrow.UnitFormat;
import com.sparrowwallet.sparrow.EventManager;
import com.sparrowwallet.sparrow.control.*;
import com.sparrowwallet.sparrow.event.*;
@@ -569,6 +570,18 @@ public void broadcastNotificationTransaction(PayNym payNym) {
}
}
+ double feeRate = walletTransaction.getFeeRate();
+ if(feeRate > AppServices.getLongFeeRatesRange().getLast()) {
+ UnitFormat format = Config.get().getUnitFormat() == null ? UnitFormat.DOT : Config.get().getUnitFormat();
+ Optional<ButtonType> optType = AppServices.showWarningDialog("Very high fee rate!",
+ "This transaction pays a very high fee rate of " + format.formatDecimalValue(feeRate, 0) + " sats/vB.\n\nBroadcast this transaction?",
+ ButtonType.YES, ButtonType.NO);
+ if(optType.isEmpty() || optType.get() != ButtonType.YES) {
+ followingList.refresh();
+ return;
+ }
+ }
+
final WalletTransaction walletTx = walletTransaction;
final PaymentCode paymentCode = masterWallet.getPaymentCode();
Wallet wallet = walletTransaction.getWallet();Why this scored 44/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.