From 4cd6652825972a32f18881a88e01681830fa0577 Mon Sep 17 00:00:00 2001 From: j-berman Date: Thu, 20 Oct 2022 16:23:10 -0500 Subject: [PATCH 1/4] Update balance after calling scan_tx --- pages/settings/SettingsWallet.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/pages/settings/SettingsWallet.qml b/pages/settings/SettingsWallet.qml index 0c1e80eaa2..604e2db8be 100644 --- a/pages/settings/SettingsWallet.qml +++ b/pages/settings/SettingsWallet.qml @@ -138,6 +138,7 @@ Rectangle { inputDialog.onAcceptedCallback = function() { var txid = inputDialog.inputText.trim(); if (currentWallet.scanTransactions([txid])) { + updateBalance(); appWindow.showStatusMessage(qsTr("Transaction successfully scanned"), 3); } else { appWindow.showStatusMessage(qsTr("Failed to scan transaction") + ": " + currentWallet.errorString, 5); From 3b0e66a3d08959c267670e832a87bdada3a91335 Mon Sep 17 00:00:00 2001 From: j-berman Date: Fri, 28 Oct 2022 16:14:31 -0500 Subject: [PATCH 2/4] Display clear error when user scans older tx via untrusted daemon --- pages/settings/SettingsWallet.qml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pages/settings/SettingsWallet.qml b/pages/settings/SettingsWallet.qml index 604e2db8be..67194231ac 100644 --- a/pages/settings/SettingsWallet.qml +++ b/pages/settings/SettingsWallet.qml @@ -141,7 +141,16 @@ Rectangle { updateBalance(); appWindow.showStatusMessage(qsTr("Transaction successfully scanned"), 3); } else { - appWindow.showStatusMessage(qsTr("Failed to scan transaction") + ": " + currentWallet.errorString, 5); + console.error("Error: ", currentWallet.errorString); + if (currentWallet.errorString == "The wallet has already seen 1 or more recent transactions than the scanned tx") { + informationPopup.title = qsTr("Error") + translationManager.emptyString; + informationPopup.text = currentWallet.errorString + ".\n\nIn order to rescan the transaction, you can re-sync your wallet by resetting the wallet restore height in the Settings > Info page. Make sure to use a restore height from before your wallet's earliest transaction." + translationManager.emptyString; + informationPopup.icon = StandardIcon.Critical + informationPopup.onCloseCallback = null + informationPopup.open(); + } else { + appWindow.showStatusMessage(qsTr("Failed to scan transaction") + ": " + currentWallet.errorString, 5); + } } } inputDialog.onRejectedCallback = null; From 499c2a47fcf0aac6698a35ea30907f381c459776 Mon Sep 17 00:00:00 2001 From: j-berman Date: Sat, 29 Oct 2022 14:22:37 -0500 Subject: [PATCH 3/4] qsTr scan tx error --- pages/settings/SettingsWallet.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/settings/SettingsWallet.qml b/pages/settings/SettingsWallet.qml index 67194231ac..db1ac49541 100644 --- a/pages/settings/SettingsWallet.qml +++ b/pages/settings/SettingsWallet.qml @@ -144,7 +144,7 @@ Rectangle { console.error("Error: ", currentWallet.errorString); if (currentWallet.errorString == "The wallet has already seen 1 or more recent transactions than the scanned tx") { informationPopup.title = qsTr("Error") + translationManager.emptyString; - informationPopup.text = currentWallet.errorString + ".\n\nIn order to rescan the transaction, you can re-sync your wallet by resetting the wallet restore height in the Settings > Info page. Make sure to use a restore height from before your wallet's earliest transaction." + translationManager.emptyString; + informationPopup.text = qsTr("The wallet has already seen 1 or more recent transactions than the scanned transaction.\n\nIn order to rescan the transaction, you can re-sync your wallet by resetting the wallet restore height in the Settings > Info page. Make sure to use a restore height from before your wallet's earliest transaction.") + translationManager.emptyString; informationPopup.icon = StandardIcon.Critical informationPopup.onCloseCallback = null informationPopup.open(); From 1215a6e5d88bf300c672c6f622982ee45f410d31 Mon Sep 17 00:00:00 2001 From: j-berman Date: Sat, 29 Oct 2022 14:23:13 -0500 Subject: [PATCH 4/4] Assume untrusted daemon in simple mode --- main.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.qml b/main.qml index 4be6be0690..8a1edbf9a4 100644 --- a/main.qml +++ b/main.qml @@ -379,7 +379,7 @@ ApplicationWindow { } function isTrustedDaemon() { - return !persistentSettings.useRemoteNode || remoteNodesModel.currentRemoteNode().trusted; + return appWindow.walletMode >= 2 && (!persistentSettings.useRemoteNode || remoteNodesModel.currentRemoteNode().trusted); } function usefulName(path) {