mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2025-04-07 19:38:25 +02:00
show custom error dialog for min relay fee not met broadcast errors
This commit is contained in:
parent
f8fce02a3d
commit
91273c2192
@ -1107,7 +1107,14 @@ public class HeadersController extends TransactionFormController implements Init
|
||||
broadcastTransactionService.setOnFailed(workerStateEvent -> {
|
||||
broadcastProgressBar.setProgress(0);
|
||||
log.error("Error broadcasting transaction", workerStateEvent.getSource().getException());
|
||||
AppServices.showErrorDialog("Error broadcasting transaction", "The server returned an error when broadcasting the transaction. The server response is contained in the log (See Help > Show Log File).");
|
||||
if(workerStateEvent.getSource().getException() != null && workerStateEvent.getSource().getException().getMessage() != null
|
||||
&& workerStateEvent.getSource().getException().getMessage().startsWith("min relay fee not met")) {
|
||||
AppServices.showErrorDialog("Error broadcasting transaction", "The fee rate for the signed transaction is below the minimum " + AppServices.getMinimumRelayFeeRate() + " sats/vB. " +
|
||||
"This usually happens because a keystore has created a signature that is larger than necessary.\n\n" +
|
||||
"You can solve this by recreating the transaction with a slightly increased fee rate.");
|
||||
} else {
|
||||
AppServices.showErrorDialog("Error broadcasting transaction", "The server returned an error when broadcasting the transaction. The server response is contained in the log (See Help > Show Log File).");
|
||||
}
|
||||
broadcastButton.setDisable(false);
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user