From 79a3d45eae82dd87c3f560a10b003c03b2190295 Mon Sep 17 00:00:00 2001 From: Howard Stearns Date: Tue, 9 Jul 2019 14:25:11 -0700 Subject: [PATCH] new-account wallets in simplified UI --- .../simplifiedUI/topBar/SimplifiedTopBar.qml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/interface/resources/qml/hifi/simplifiedUI/topBar/SimplifiedTopBar.qml b/interface/resources/qml/hifi/simplifiedUI/topBar/SimplifiedTopBar.qml index 61d2fd6634..45450383b5 100644 --- a/interface/resources/qml/hifi/simplifiedUI/topBar/SimplifiedTopBar.qml +++ b/interface/resources/qml/hifi/simplifiedUI/topBar/SimplifiedTopBar.qml @@ -76,10 +76,20 @@ Rectangle { return; } - if (walletStatus === 5) { + switch (walletStatus) { + case 1: + var randomNumber = Math.floor(Math.random() * 34) + 1; + var securityImagePath = "images/" + randomNumber.toString().padStart(2, '0') + ".jpg"; + Commerce.getWalletAuthenticatedStatus(); // before writing security image, ensures that salt/account password is set. + Commerce.chooseSecurityImage(securityImagePath); + Commerce.generateKeyPair() + Commerce.getWalletStatus(); + break; + case 5: topBarInventoryModel.getFirstPage(); - } else { - // Show some error to the user + break; + default: + console.log('WARNING: SimplifiedTopBar.qml walletStatusResult:', walletStatus); } }