From 33ba41e8656cbc381332c08ddfcca00bf21c73d1 Mon Sep 17 00:00:00 2001 From: Szymon Lesisz Date: Mon, 8 Oct 2018 13:55:59 +0200 Subject: [PATCH 1/2] added React.Fragment to Receive page --- .../Wallet/views/Account/Receive/index.js | 132 +++++++++--------- 1 file changed, 67 insertions(+), 65 deletions(-) diff --git a/src/views/Wallet/views/Account/Receive/index.js b/src/views/Wallet/views/Account/Receive/index.js index 9be4bc3e..80237ef3 100644 --- a/src/views/Wallet/views/Account/Receive/index.js +++ b/src/views/Wallet/views/Account/Receive/index.js @@ -159,73 +159,75 @@ const AccountReceive = (props: Props) => { return ( -

Receive Ethereum or tokens

- - {isAddressVerifying && ( - Confirm address on TREZOR - )} - {((addressVerified || addressUnverified) && !isAddressVerifying) && ( - - )} - > - props.showAddress(account.addressPath)} - > - - - - - - )} - +

Receive Ethereum or tokens

+ - {address} -
- {isAddressVerifying && ( - - - - Confirm address on TREZOR + )} + {((addressVerified || addressUnverified) && !isAddressVerifying) && ( + + )} + > + props.showAddress(account.addressPath)} + > + + + + + + )} + + {address} + + {isAddressVerifying && ( + + + + + Check address on your Trezor + + + )} + {(addressVerified || addressUnverified) && ( + + + - Check address on your Trezor - - - )} - {(addressVerified || addressUnverified) && ( - - - - - )} - {!(addressVerified || addressUnverified) && ( - props.showAddress(account.addressPath)} isDisabled={device.connected && !discovery.completed}> - Show full address - - )} -
+ + )} + {!(addressVerified || addressUnverified) && ( + props.showAddress(account.addressPath)} isDisabled={device.connected && !discovery.completed}> + Show full address + + )} + +
); }; From b9251f8db7bbb86d116a403119207efbe2fd52e6 Mon Sep 17 00:00:00 2001 From: Szymon Lesisz Date: Mon, 8 Oct 2018 18:22:21 +0200 Subject: [PATCH 2/2] add and verify local storage version fix: #131 --- src/actions/LocalStorageActions.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/actions/LocalStorageActions.js b/src/actions/LocalStorageActions.js index 5e6cef06..68439803 100644 --- a/src/actions/LocalStorageActions.js +++ b/src/actions/LocalStorageActions.js @@ -88,6 +88,8 @@ export function update(event: StorageEvent): AsyncAction { }; } +const VERSION: string = '1'; + export function loadTokensFromJSON(): AsyncAction { return async (dispatch: Dispatch): Promise => { if (typeof window.localStorage === 'undefined') return; @@ -100,6 +102,13 @@ export function loadTokensFromJSON(): AsyncAction { dispatch(update(event)); }); + // validate version + const version: ?string = get('version'); + if (version !== VERSION) { + window.localStorage.clear(); + dispatch(save('version', VERSION)); + } + // load tokens const tokens = await config.coins.reduce(async (promise: Promise, coin: Coin): Promise => { const collection: TokensCollection = await promise;