mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-24 09:18:09 +00:00
Merge branch 'master' into fix-wallet-modals
This commit is contained in:
commit
5524080c30
@ -88,6 +88,8 @@ export function update(event: StorageEvent): AsyncAction {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const VERSION: string = '1';
|
||||||
|
|
||||||
export function loadTokensFromJSON(): AsyncAction {
|
export function loadTokensFromJSON(): AsyncAction {
|
||||||
return async (dispatch: Dispatch): Promise<void> => {
|
return async (dispatch: Dispatch): Promise<void> => {
|
||||||
if (typeof window.localStorage === 'undefined') return;
|
if (typeof window.localStorage === 'undefined') return;
|
||||||
@ -100,6 +102,13 @@ export function loadTokensFromJSON(): AsyncAction {
|
|||||||
dispatch(update(event));
|
dispatch(update(event));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// validate version
|
||||||
|
const version: ?string = get('version');
|
||||||
|
if (version !== VERSION) {
|
||||||
|
window.localStorage.clear();
|
||||||
|
dispatch(save('version', VERSION));
|
||||||
|
}
|
||||||
|
|
||||||
// load tokens
|
// load tokens
|
||||||
const tokens = await config.coins.reduce(async (promise: Promise<TokensCollection>, coin: Coin): Promise<TokensCollection> => {
|
const tokens = await config.coins.reduce(async (promise: Promise<TokensCollection>, coin: Coin): Promise<TokensCollection> => {
|
||||||
const collection: TokensCollection = await promise;
|
const collection: TokensCollection = await promise;
|
||||||
|
@ -159,6 +159,7 @@ const AccountReceive = (props: Props) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Content>
|
<Content>
|
||||||
|
<React.Fragment>
|
||||||
<H2>Receive Ethereum or tokens</H2>
|
<H2>Receive Ethereum or tokens</H2>
|
||||||
<AddressWrapper
|
<AddressWrapper
|
||||||
isShowingQrCode={addressVerified || addressUnverified}
|
isShowingQrCode={addressVerified || addressUnverified}
|
||||||
@ -226,6 +227,7 @@ const AccountReceive = (props: Props) => {
|
|||||||
</ShowAddressButton>
|
</ShowAddressButton>
|
||||||
)}
|
)}
|
||||||
</AddressWrapper>
|
</AddressWrapper>
|
||||||
|
</React.Fragment>
|
||||||
</Content>
|
</Content>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user