mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-08 21:47:30 +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) {
|
} else if (walletStatus === 1) {
|
||||||
if (root.activeView !== "walletSetup") {
|
if (root.activeView !== "walletSetup") {
|
||||||
root.activeView = "walletSetup";
|
root.activeView = "walletSetup";
|
||||||
|
commerce.resetLocalWalletOnly();
|
||||||
}
|
}
|
||||||
} else if (walletStatus === 2) {
|
} else if (walletStatus === 2) {
|
||||||
if (root.activeView !== "passphraseModal") {
|
if (root.activeView !== "passphraseModal") {
|
||||||
|
|
|
@ -371,7 +371,7 @@ Item {
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: securityImageTip;
|
id: securityImageTip;
|
||||||
visible: false;
|
visible: !root.hasShownSecurityImageTip && root.activeView === "step_3";
|
||||||
z: 999;
|
z: 999;
|
||||||
anchors.fill: root;
|
anchors.fill: root;
|
||||||
|
|
||||||
|
@ -421,7 +421,6 @@ Item {
|
||||||
text: "Got It";
|
text: "Got It";
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.hasShownSecurityImageTip = true;
|
root.hasShownSecurityImageTip = true;
|
||||||
securityImageTip.visible = false;
|
|
||||||
passphraseSelection.focusFirstTextField();
|
passphraseSelection.focusFirstTextField();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -439,9 +438,6 @@ Item {
|
||||||
onVisibleChanged: {
|
onVisibleChanged: {
|
||||||
if (visible) {
|
if (visible) {
|
||||||
commerce.getWalletAuthenticatedStatus();
|
commerce.getWalletAuthenticatedStatus();
|
||||||
if (!root.hasShownSecurityImageTip) {
|
|
||||||
securityImageTip.visible = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -732,6 +728,7 @@ Item {
|
||||||
text: "Finish";
|
text: "Finish";
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.visible = false;
|
root.visible = false;
|
||||||
|
root.hasShownSecurityImageTip = false;
|
||||||
sendSignalToWallet({method: 'walletSetup_finished', referrer: root.referrer ? root.referrer : ""});
|
sendSignalToWallet({method: 'walletSetup_finished', referrer: root.referrer ? root.referrer : ""});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,6 +128,11 @@ void QmlCommerce::reset() {
|
||||||
wallet->reset();
|
wallet->reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QmlCommerce::resetLocalWalletOnly() {
|
||||||
|
auto wallet = DependencyManager::get<Wallet>();
|
||||||
|
wallet->reset();
|
||||||
|
}
|
||||||
|
|
||||||
void QmlCommerce::account() {
|
void QmlCommerce::account() {
|
||||||
auto ledger = DependencyManager::get<Ledger>();
|
auto ledger = DependencyManager::get<Ledger>();
|
||||||
ledger->account();
|
ledger->account();
|
||||||
|
|
|
@ -65,6 +65,7 @@ protected:
|
||||||
Q_INVOKABLE void history();
|
Q_INVOKABLE void history();
|
||||||
Q_INVOKABLE void generateKeyPair();
|
Q_INVOKABLE void generateKeyPair();
|
||||||
Q_INVOKABLE void reset();
|
Q_INVOKABLE void reset();
|
||||||
|
Q_INVOKABLE void resetLocalWalletOnly();
|
||||||
Q_INVOKABLE void account();
|
Q_INVOKABLE void account();
|
||||||
|
|
||||||
Q_INVOKABLE void certificateInfo(const QString& certificateId);
|
Q_INVOKABLE void certificateInfo(const QString& certificateId);
|
||||||
|
|
Loading…
Reference in a new issue