mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2025-11-05 11:56:37 +00:00
show custom error dialog for min relay fee not met broadcast errors
This commit is contained in:
parent
f8fce02a3d
commit
91273c2192
1 changed files with 8 additions and 1 deletions
|
|
@ -1107,7 +1107,14 @@ public class HeadersController extends TransactionFormController implements Init
|
||||||
broadcastTransactionService.setOnFailed(workerStateEvent -> {
|
broadcastTransactionService.setOnFailed(workerStateEvent -> {
|
||||||
broadcastProgressBar.setProgress(0);
|
broadcastProgressBar.setProgress(0);
|
||||||
log.error("Error broadcasting transaction", workerStateEvent.getSource().getException());
|
log.error("Error broadcasting transaction", workerStateEvent.getSource().getException());
|
||||||
|
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).");
|
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);
|
broadcastButton.setDisable(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue