From 009d3a18a390c46b957e03d552b3fdc94b21fe9d Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Thu, 30 Nov 2017 15:40:20 -0800 Subject: [PATCH] Call reset() on Ledger and Wallet before creating new wallet --- interface/resources/qml/hifi/commerce/wallet/Wallet.qml | 1 + .../resources/qml/hifi/commerce/wallet/WalletSetup.qml | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/interface/resources/qml/hifi/commerce/wallet/Wallet.qml b/interface/resources/qml/hifi/commerce/wallet/Wallet.qml index 759d7a37eb..6af6a484b9 100644 --- a/interface/resources/qml/hifi/commerce/wallet/Wallet.qml +++ b/interface/resources/qml/hifi/commerce/wallet/Wallet.qml @@ -47,6 +47,7 @@ Rectangle { } else if (walletStatus === 1) { if (root.activeView !== "walletSetup") { root.activeView = "walletSetup"; + commerce.reset(); } } else if (walletStatus === 2) { if (root.activeView !== "passphraseModal") { diff --git a/interface/resources/qml/hifi/commerce/wallet/WalletSetup.qml b/interface/resources/qml/hifi/commerce/wallet/WalletSetup.qml index 1a62fe6f0d..369f8c1f95 100644 --- a/interface/resources/qml/hifi/commerce/wallet/WalletSetup.qml +++ b/interface/resources/qml/hifi/commerce/wallet/WalletSetup.qml @@ -225,6 +225,7 @@ Item { height: 50; text: "Set Up Wallet"; onClicked: { + commerce.account(); root.activeView = "step_2"; } } @@ -371,7 +372,7 @@ Item { Item { id: securityImageTip; - visible: false; + visible: !root.hasShownSecurityImageTip && root.activeView === "step_3"; z: 999; anchors.fill: root; @@ -421,7 +422,6 @@ Item { text: "Got It"; onClicked: { root.hasShownSecurityImageTip = true; - securityImageTip.visible = false; passphraseSelection.focusFirstTextField(); } } @@ -439,9 +439,6 @@ Item { onVisibleChanged: { if (visible) { commerce.getWalletAuthenticatedStatus(); - if (!root.hasShownSecurityImageTip) { - securityImageTip.visible = true; - } } } @@ -732,6 +729,7 @@ Item { text: "Finish"; onClicked: { root.visible = false; + root.hasShownSecurityImageTip = false; sendSignalToWallet({method: 'walletSetup_finished', referrer: root.referrer ? root.referrer : ""}); } }