Remove unnecessary code

This commit is contained in:
Zach Fox 2017-08-31 15:42:32 -07:00
parent 2c2500875f
commit 0a9e3e8967
4 changed files with 5 additions and 25 deletions

View file

@ -62,7 +62,6 @@ Rectangle {
if (!exists && root.activeView !== "notSetUp") { // "If security image is not set up" if (!exists && root.activeView !== "notSetUp") { // "If security image is not set up"
root.activeView = "notSetUp"; root.activeView = "notSetUp";
} else if (exists && root.activeView === "initialize") { } else if (exists && root.activeView === "initialize") {
root.activeView = "checkoutMain";
commerce.getWalletAuthenticatedStatus(); commerce.getWalletAuthenticatedStatus();
} else if (exists) { } else if (exists) {
// just set the source again (to be sure the change was noticed) // just set the source again (to be sure the change was noticed)
@ -75,6 +74,7 @@ Rectangle {
if (!isAuthenticated && !passphraseModal.visible) { if (!isAuthenticated && !passphraseModal.visible) {
passphraseModal.visible = true; passphraseModal.visible = true;
} else if (isAuthenticated) { } else if (isAuthenticated) {
root.activeView = "checkoutMain";
if (!balanceReceived) { if (!balanceReceived) {
commerce.balance(); commerce.balance();
} }
@ -235,16 +235,7 @@ Rectangle {
Connections { Connections {
onSendSignalToParent: { onSendSignalToParent: {
if (msg.method === 'passphraseModal_authSuccess') { sendToScript(msg);
if (!balanceReceived) {
commerce.balance();
}
if (!purchasesReceived) {
commerce.inventory();
}
} else {
sendToScript(msg);
}
} }
} }
} }

View file

@ -57,7 +57,6 @@ Rectangle {
if (!exists && root.activeView !== "notSetUp") { // "If security image is not set up" if (!exists && root.activeView !== "notSetUp") { // "If security image is not set up"
root.activeView = "notSetUp"; root.activeView = "notSetUp";
} else if (exists && root.activeView === "initialize") { } else if (exists && root.activeView === "initialize") {
root.activeView = "purchasesMain";
commerce.getWalletAuthenticatedStatus(); commerce.getWalletAuthenticatedStatus();
} else if (exists) { } else if (exists) {
// just set the source again (to be sure the change was noticed) // just set the source again (to be sure the change was noticed)
@ -70,6 +69,7 @@ Rectangle {
if (!isAuthenticated && !passphraseModal.visible) { if (!isAuthenticated && !passphraseModal.visible) {
passphraseModal.visible = true; passphraseModal.visible = true;
} else if (isAuthenticated) { } else if (isAuthenticated) {
root.activeView = "purchasesMain";
commerce.inventory(); commerce.inventory();
} }
} }
@ -206,13 +206,7 @@ Rectangle {
Connections { Connections {
onSendSignalToParent: { onSendSignalToParent: {
if (msg.method === 'passphraseModal_authSuccess') { sendToScript(msg);
if (!purchasesReceived) {
commerce.inventory();
}
} else {
sendToScript(msg);
}
} }
} }
} }

View file

@ -41,7 +41,6 @@ Item {
errorText.text = "Authentication failed - please try again."; errorText.text = "Authentication failed - please try again.";
} else { } else {
root.visible = false; root.visible = false;
sendSignalToParent({method: 'passphraseModal_authSuccess'});
} }
} }
} }

View file

@ -232,11 +232,7 @@ Rectangle {
Connections { Connections {
onSendSignalToParent: { onSendSignalToParent: {
if (msg.method === 'passphraseModal_authSuccess') { sendToScript(msg);
root.activeView = "walletHome";
} else {
sendToScript(msg);
}
} }
} }
} }