diff --git a/interface/resources/qml/hifi/commerce/purchases/Purchases.qml b/interface/resources/qml/hifi/commerce/purchases/Purchases.qml
index 383223a49c..d95738fc08 100644
--- a/interface/resources/qml/hifi/commerce/purchases/Purchases.qml
+++ b/interface/resources/qml/hifi/commerce/purchases/Purchases.qml
@@ -35,12 +35,20 @@ Rectangle {
Hifi.QmlCommerce {
id: commerce;
+ onAccountResult: {
+ if(result.status === "success") {
+ commerce.getKeyFilePathIfExists();
+ } else {
+ // unsure how to handle a failure here. We definitely cannot proceed.
+ }
+ }
+
onLoginStatusResult: {
if (!isLoggedIn && root.activeView !== "needsLogIn") {
root.activeView = "needsLogIn";
} else if (isLoggedIn) {
root.activeView = "initialize";
- commerce.getKeyFilePathIfExists();
+ commerce.account();
}
}
@@ -174,7 +182,7 @@ Rectangle {
commerce.getLoginStatus();
}
}
-
+
HifiWallet.NeedsLogIn {
id: needsLogIn;
visible: root.activeView === "needsLogIn";
@@ -210,7 +218,7 @@ Rectangle {
}
}
}
-
+
//
// "WALLET NOT SET UP" START
//
@@ -221,7 +229,7 @@ Rectangle {
anchors.bottom: parent.bottom;
anchors.left: parent.left;
anchors.right: parent.right;
-
+
RalewayRegular {
id: notSetUpText;
text: "Your wallet isn't set up.
Set up your Wallet (no credit card necessary) to claim your free HFC " +
@@ -252,7 +260,7 @@ Rectangle {
anchors.left: parent.left;
anchors.bottom: parent.bottom;
anchors.bottomMargin: 24;
-
+
// "Cancel" button
HifiControlsUit.Button {
id: cancelButton;
@@ -309,7 +317,7 @@ Rectangle {
anchors.topMargin: 8;
anchors.bottom: actionButtonsContainer.top;
anchors.bottomMargin: 8;
-
+
//
// FILTER BAR START
//
@@ -383,7 +391,7 @@ Rectangle {
itemHref: root_file_url;
anchors.topMargin: 12;
anchors.bottomMargin: 12;
-
+
Connections {
onSendToPurchases: {
if (msg.method === 'purchases_itemInfoClicked') {
@@ -402,7 +410,7 @@ Rectangle {
anchors.left: parent.left;
anchors.bottom: parent.bottom;
width: parent.width;
-
+
// Explanitory text
RalewayRegular {
id: haventPurchasedYet;