send: improve helptext for specific rpc errors

This commit is contained in:
tobtoht 2024-03-12 16:50:53 +01:00
parent 0ab4b8e9b8
commit 70e0b84ac9
No known key found for this signature in database
GPG key ID: E45B10DD027D2472

View 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."};