]> Nutra Git (v1) - gamesguru/feather.git/commitdiff
send: improve helptext for specific rpc errors
authortobtoht <tob@featherwallet.org>
Tue, 12 Mar 2024 15:50:53 +0000 (16:50 +0100)
committertobtoht <tob@featherwallet.org>
Tue, 12 Mar 2024 15:50:53 +0000 (16:50 +0100)
src/MainWindow.cpp

index 8aacc13d53fa2557c4da30e44cc2cd44c2418390..14b7db8a39aa620ff6115c48c4c75427e03e2206 100644 (file)
@@ -864,6 +864,11 @@ void MainWindow::onTransactionCreated(PendingTransaction *tx, const QVector<QStr
                     message.description = "Spendable balance insufficient to pay for transaction fee.";
                     bug = false;
                 }
+                if (msg.contains("Failed to get height") || msg.contains("Failed to get earliest fork height")) {
+                    message.description = QString("RPC error: %1").arg(QString::fromStdString(e.to_string()));
+                    message.helpItems = {"Try sending the transaction again.", "If this keeps happening, connect to a different node."};
+                    bug = false;
+                }
 
                 if (bug) {
                     message.helpItems = {"You have found a bug. Please contact the developers."};