This commit is contained in:
howard-stearns 2018-02-23 14:46:13 -08:00
parent 9b54ab1080
commit 050df2ac2a

View file

@ -47,13 +47,7 @@ Rectangle {
} }
} else if (walletStatus === 1) { } else if (walletStatus === 1) {
if (root.activeView !== "walletSetup") { if (root.activeView !== "walletSetup") {
root.activeView = "walletSetup"; walletSetup();
Commerce.resetLocalWalletOnly();
var timestamp = new Date();
walletSetup.startingTimestamp = timestamp;
walletSetup.setupAttemptID = generateUUID();
UserActivityLogger.commerceWalletSetupStarted(timestamp, setupAttemptID, walletSetup.setupFlowVersion, walletSetup.referrer ? walletSetup.referrer : "wallet app",
(AddressManager.placename || AddressManager.hostname || '') + (AddressManager.pathname ? AddressManager.pathname.match(/\/[^\/]+/)[0] : ''));
} }
} else if (walletStatus === 2) { } else if (walletStatus === 2) {
if (root.activeView != "preexisting") { if (root.activeView != "preexisting") {
@ -183,6 +177,7 @@ Rectangle {
proceedFunction: function (isReset) { proceedFunction: function (isReset) {
console.log(isReset ? "Reset wallet." : "Trying again with new wallet."); console.log(isReset ? "Reset wallet." : "Trying again with new wallet.");
if (isReset) { if (isReset) {
} else {
root.activeView = "initialize"; root.activeView = "initialize";
Commerce.getWalletStatus(); Commerce.getWalletStatus();
} }
@ -742,7 +737,6 @@ Rectangle {
} }
} }
// //
// FUNCTION DEFINITIONS START // FUNCTION DEFINITIONS START
// //
@ -793,6 +787,16 @@ Rectangle {
return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16); return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16);
}); });
} }
function walletSetup() {
root.activeView = "walletSetup";
Commerce.resetLocalWalletOnly();
var timestamp = new Date();
walletSetup.startingTimestamp = timestamp;
walletSetup.setupAttemptID = generateUUID();
UserActivityLogger.commerceWalletSetupStarted(timestamp, setupAttemptID, walletSetup.setupFlowVersion, walletSetup.referrer ? walletSetup.referrer : "wallet app",
(AddressManager.placename || AddressManager.hostname || '') + (AddressManager.pathname ? AddressManager.pathname.match(/\/[^\/]+/)[0] : ''));
}
// //
// FUNCTION DEFINITIONS END // FUNCTION DEFINITIONS END
// //