diff options
| author | Jaquee <jaquee.monero@gmail.com> | 2017-01-12 22:28:37 +0100 |
|---|---|---|
| committer | Jaquee <jaquee.monero@gmail.com> | 2017-01-15 12:32:39 +0100 |
| commit | 24ccd27d790a45576d93d39ad2839eae320ac791 (patch) | |
| tree | 341a4d9fb403b68ce4aeedb765897adce0bad331 | |
| parent | 15c79df378db97b713150d92390a013e63044128 (diff) | |
| download | monzero-gui-24ccd27d790a45576d93d39ad2839eae320ac791.tar.gz monzero-gui-24ccd27d790a45576d93d39ad2839eae320ac791.tar.xz monzero-gui-24ccd27d790a45576d93d39ad2839eae320ac791.zip | |
Add rescan spent button
| -rw-r--r-- | pages/Transfer.qml | 26 | ||||
| -rw-r--r-- | src/libwalletqt/Wallet.cpp | 5 | ||||
| -rw-r--r-- | src/libwalletqt/Wallet.h | 3 |
3 files changed, 33 insertions, 1 deletions
diff --git a/pages/Transfer.qml b/pages/Transfer.qml index 9f63c330..78dfde5e 100644 --- a/pages/Transfer.qml +++ b/pages/Transfer.qml @@ -498,6 +498,32 @@ Rectangle { submitTxDialog.open(); } } + + StandardButton { + id: rescanSpentButton + text: qsTr("Rescan spent") + translationManager.emptyString + shadowReleasedColor: "#FF4304" + shadowPressedColor: "#B32D00" + releasedColor: "#FF6C3C" + pressedColor: "#FF4304" + enabled: pageRoot.enabled + onClicked: { + if (!currentWallet.rescanSpent()) { + console.error("Error: ", currentWallet.errorString); + informationPopup.title = qsTr("Error") + translationManager.emptyString; + informationPopup.text = qsTr("Error: ") + currentWallet.errorString + informationPopup.icon = StandardIcon.Critical + informationPopup.onCloseCallback = null + informationPopup.open(); + } else { + informationPopup.title = qsTr("Information") + translationManager.emptyString + informationPopup.text = qsTr("Sucessfully rescanned spent outputs") + translationManager.emptyString + informationPopup.icon = StandardIcon.Information + informationPopup.onCloseCallback = null + informationPopup.open(); + } + } + } } diff --git a/src/libwalletqt/Wallet.cpp b/src/libwalletqt/Wallet.cpp index 25670662..f8c6bb1d 100644 --- a/src/libwalletqt/Wallet.cpp +++ b/src/libwalletqt/Wallet.cpp @@ -507,6 +507,11 @@ bool Wallet::parse_uri(const QString &uri, QString &address, QString &payment_id return res; } +bool Wallet::rescanSpent() +{ + return m_walletImpl->rescanSpent(); +} + Wallet::Wallet(Monero::Wallet *w, QObject *parent) : QObject(parent) , m_walletImpl(w) diff --git a/src/libwalletqt/Wallet.h b/src/libwalletqt/Wallet.h index 28550a7f..2fb0ba6e 100644 --- a/src/libwalletqt/Wallet.h +++ b/src/libwalletqt/Wallet.h @@ -210,8 +210,9 @@ public: Q_INVOKABLE bool setUserNote(const QString &txid, const QString ¬e); Q_INVOKABLE QString getUserNote(const QString &txid) const; - Q_INVOKABLE QString getTxKey(const QString &txid) const; + // Rescan spent outputs + Q_INVOKABLE bool rescanSpent(); // TODO: setListenter() when it implemented in API signals: |
