From 0f180d57eb585aef9f4ccf796297ec44c3aaa5dc Mon Sep 17 00:00:00 2001 From: pbca26 Date: Fri, 18 Aug 2017 14:39:50 +0300 Subject: [PATCH] update iguanaActiveHandle --- react/src/actions/actions/addressBalance.js | 2 +- react/src/actions/actions/walletAuth.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/react/src/actions/actions/addressBalance.js b/react/src/actions/actions/addressBalance.js index a420575..9ec636b 100644 --- a/react/src/actions/actions/addressBalance.js +++ b/react/src/actions/actions/addressBalance.js @@ -222,7 +222,7 @@ export function getKMDAddressesNative(coin, mode, currentAddress) { let isNewAddr = true; for (let x = 0; x < result.length && isNewAddr; x++) { - for (let y=0; y < result[x].length && isNewAddr; y++) { + for (let y = 0; y < result[x].length && isNewAddr; y++) { if (allAddrArray[a] === result[x][y]) { isNewAddr = false; } diff --git a/react/src/actions/actions/walletAuth.js b/react/src/actions/actions/walletAuth.js index 31f2332..80798ac 100644 --- a/react/src/actions/actions/walletAuth.js +++ b/react/src/actions/actions/walletAuth.js @@ -255,6 +255,12 @@ export function iguanaActiveHandle(getMainAddress) { 'response': json, })); } + if (!Config.iguanaLessMode && + sessionStorage.getItem('IguanaActiveAccount') && + JSON.parse(sessionStorage.getItem('IguanaActiveAccount')).pubkey === json.pubkey && + json.status === 'unlocked') { + sessionStorage.setItem('IguanaActiveAccount', JSON.stringify(json)); + } dispatch(getMainAddress ? getMainAddressState(json) : iguanaActiveHandleState(json)); }); }