Call reset() on Ledger and Wallet before creating new wallet

This commit is contained in:
Zach Fox 2017-11-30 15:40:20 -08:00
parent 59aea9c401
commit 009d3a18a3
2 changed files with 4 additions and 5 deletions

View file

@ -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.reset();
} }
} else if (walletStatus === 2) { } else if (walletStatus === 2) {
if (root.activeView !== "passphraseModal") { if (root.activeView !== "passphraseModal") {

View file

@ -225,6 +225,7 @@ Item {
height: 50; height: 50;
text: "Set Up Wallet"; text: "Set Up Wallet";
onClicked: { onClicked: {
commerce.account();
root.activeView = "step_2"; root.activeView = "step_2";
} }
} }
@ -371,7 +372,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 +422,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 +439,6 @@ Item {
onVisibleChanged: { onVisibleChanged: {
if (visible) { if (visible) {
commerce.getWalletAuthenticatedStatus(); commerce.getWalletAuthenticatedStatus();
if (!root.hasShownSecurityImageTip) {
securityImageTip.visible = true;
}
} }
} }
@ -732,6 +729,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 : ""});
} }
} }