mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 18:55:01 +02:00
Merge pull request #11905 from zfox23/commerce_resetWalletBeforeCreation
Call reset() on Wallet before creating new wallet
This commit is contained in:
commit
4c96fc2d9d
4 changed files with 9 additions and 5 deletions
|
@ -47,6 +47,7 @@ Rectangle {
|
|||
} else if (walletStatus === 1) {
|
||||
if (root.activeView !== "walletSetup") {
|
||||
root.activeView = "walletSetup";
|
||||
commerce.resetLocalWalletOnly();
|
||||
}
|
||||
} else if (walletStatus === 2) {
|
||||
if (root.activeView !== "passphraseModal") {
|
||||
|
|
|
@ -371,7 +371,7 @@ Item {
|
|||
|
||||
Item {
|
||||
id: securityImageTip;
|
||||
visible: false;
|
||||
visible: !root.hasShownSecurityImageTip && root.activeView === "step_3";
|
||||
z: 999;
|
||||
anchors.fill: root;
|
||||
|
||||
|
@ -421,7 +421,6 @@ Item {
|
|||
text: "Got It";
|
||||
onClicked: {
|
||||
root.hasShownSecurityImageTip = true;
|
||||
securityImageTip.visible = false;
|
||||
passphraseSelection.focusFirstTextField();
|
||||
}
|
||||
}
|
||||
|
@ -439,9 +438,6 @@ Item {
|
|||
onVisibleChanged: {
|
||||
if (visible) {
|
||||
commerce.getWalletAuthenticatedStatus();
|
||||
if (!root.hasShownSecurityImageTip) {
|
||||
securityImageTip.visible = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -732,6 +728,7 @@ Item {
|
|||
text: "Finish";
|
||||
onClicked: {
|
||||
root.visible = false;
|
||||
root.hasShownSecurityImageTip = false;
|
||||
sendSignalToWallet({method: 'walletSetup_finished', referrer: root.referrer ? root.referrer : ""});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -128,6 +128,11 @@ void QmlCommerce::reset() {
|
|||
wallet->reset();
|
||||
}
|
||||
|
||||
void QmlCommerce::resetLocalWalletOnly() {
|
||||
auto wallet = DependencyManager::get<Wallet>();
|
||||
wallet->reset();
|
||||
}
|
||||
|
||||
void QmlCommerce::account() {
|
||||
auto ledger = DependencyManager::get<Ledger>();
|
||||
ledger->account();
|
||||
|
|
|
@ -65,6 +65,7 @@ protected:
|
|||
Q_INVOKABLE void history();
|
||||
Q_INVOKABLE void generateKeyPair();
|
||||
Q_INVOKABLE void reset();
|
||||
Q_INVOKABLE void resetLocalWalletOnly();
|
||||
Q_INVOKABLE void account();
|
||||
|
||||
Q_INVOKABLE void certificateInfo(const QString& certificateId);
|
||||
|
|
Loading…
Reference in a new issue