mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-23 12:09:57 +00:00
Add rescan spent button
This commit is contained in:
parent
15c79df378
commit
24ccd27d79
3 changed files with 33 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue