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; 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 + + )} + +
); };