mirror of
https://github.com/trezor/trezor-wallet
synced 2024-12-30 19:00:53 +00:00
Load tokens only is exists in config
This commit is contained in:
parent
c6ce9a94d7
commit
a58644f8ec
@ -156,8 +156,10 @@ const loadJSON = (): AsyncAction => async (dispatch: Dispatch): Promise<void> =>
|
||||
// load tokens
|
||||
const tokens = await config.networks.reduce(async (promise: Promise<TokensCollection>, network: Network): Promise<TokensCollection> => {
|
||||
const collection: TokensCollection = await promise;
|
||||
const json = await httpRequest(network.tokens, 'json');
|
||||
collection[network.shortcut] = json;
|
||||
if (network.tokens) {
|
||||
const json = await httpRequest(network.tokens, 'json');
|
||||
collection[network.shortcut] = json;
|
||||
}
|
||||
return collection;
|
||||
}, Promise.resolve({}));
|
||||
|
||||
@ -175,7 +177,7 @@ const loadJSON = (): AsyncAction => async (dispatch: Dispatch): Promise<void> =>
|
||||
}
|
||||
};
|
||||
|
||||
const VERSION: string = '1';
|
||||
const VERSION: string = '2';
|
||||
|
||||
const loadStorageData = (): ThunkAction => (dispatch: Dispatch): void => {
|
||||
// validate version
|
||||
|
Loading…
Reference in New Issue
Block a user