From 0a9e3e8967c90dee56fb961df7c6b36d8b134b14 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Thu, 31 Aug 2017 15:42:32 -0700 Subject: [PATCH] Remove unnecessary code --- .../qml/hifi/commerce/checkout/Checkout.qml | 13 ++----------- .../qml/hifi/commerce/purchases/Purchases.qml | 10 ++-------- .../qml/hifi/commerce/wallet/PassphraseModal.qml | 1 - .../resources/qml/hifi/commerce/wallet/Wallet.qml | 6 +----- 4 files changed, 5 insertions(+), 25 deletions(-) diff --git a/interface/resources/qml/hifi/commerce/checkout/Checkout.qml b/interface/resources/qml/hifi/commerce/checkout/Checkout.qml index 4d019685fd..28e5b32c4d 100644 --- a/interface/resources/qml/hifi/commerce/checkout/Checkout.qml +++ b/interface/resources/qml/hifi/commerce/checkout/Checkout.qml @@ -62,7 +62,6 @@ Rectangle { if (!exists && root.activeView !== "notSetUp") { // "If security image is not set up" root.activeView = "notSetUp"; } else if (exists && root.activeView === "initialize") { - root.activeView = "checkoutMain"; commerce.getWalletAuthenticatedStatus(); } else if (exists) { // just set the source again (to be sure the change was noticed) @@ -75,6 +74,7 @@ Rectangle { if (!isAuthenticated && !passphraseModal.visible) { passphraseModal.visible = true; } else if (isAuthenticated) { + root.activeView = "checkoutMain"; if (!balanceReceived) { commerce.balance(); } @@ -235,16 +235,7 @@ Rectangle { Connections { onSendSignalToParent: { - if (msg.method === 'passphraseModal_authSuccess') { - if (!balanceReceived) { - commerce.balance(); - } - if (!purchasesReceived) { - commerce.inventory(); - } - } else { - sendToScript(msg); - } + sendToScript(msg); } } } diff --git a/interface/resources/qml/hifi/commerce/purchases/Purchases.qml b/interface/resources/qml/hifi/commerce/purchases/Purchases.qml index 71e182e023..383223a49c 100644 --- a/interface/resources/qml/hifi/commerce/purchases/Purchases.qml +++ b/interface/resources/qml/hifi/commerce/purchases/Purchases.qml @@ -57,7 +57,6 @@ Rectangle { if (!exists && root.activeView !== "notSetUp") { // "If security image is not set up" root.activeView = "notSetUp"; } else if (exists && root.activeView === "initialize") { - root.activeView = "purchasesMain"; commerce.getWalletAuthenticatedStatus(); } else if (exists) { // just set the source again (to be sure the change was noticed) @@ -70,6 +69,7 @@ Rectangle { if (!isAuthenticated && !passphraseModal.visible) { passphraseModal.visible = true; } else if (isAuthenticated) { + root.activeView = "purchasesMain"; commerce.inventory(); } } @@ -206,13 +206,7 @@ Rectangle { Connections { onSendSignalToParent: { - if (msg.method === 'passphraseModal_authSuccess') { - if (!purchasesReceived) { - commerce.inventory(); - } - } else { - sendToScript(msg); - } + sendToScript(msg); } } } diff --git a/interface/resources/qml/hifi/commerce/wallet/PassphraseModal.qml b/interface/resources/qml/hifi/commerce/wallet/PassphraseModal.qml index ae4ad63047..519885acc9 100644 --- a/interface/resources/qml/hifi/commerce/wallet/PassphraseModal.qml +++ b/interface/resources/qml/hifi/commerce/wallet/PassphraseModal.qml @@ -41,7 +41,6 @@ Item { errorText.text = "Authentication failed - please try again."; } else { root.visible = false; - sendSignalToParent({method: 'passphraseModal_authSuccess'}); } } } diff --git a/interface/resources/qml/hifi/commerce/wallet/Wallet.qml b/interface/resources/qml/hifi/commerce/wallet/Wallet.qml index ad8f6531bc..5adf37ba2b 100644 --- a/interface/resources/qml/hifi/commerce/wallet/Wallet.qml +++ b/interface/resources/qml/hifi/commerce/wallet/Wallet.qml @@ -232,11 +232,7 @@ Rectangle { Connections { onSendSignalToParent: { - if (msg.method === 'passphraseModal_authSuccess') { - root.activeView = "walletHome"; - } else { - sendToScript(msg); - } + sendToScript(msg); } } }