mirror of
https://github.com/trezor/trezor-wallet
synced 2025-01-02 12:20: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
|
// load tokens
|
||||||
const tokens = await config.networks.reduce(async (promise: Promise<TokensCollection>, network: Network): Promise<TokensCollection> => {
|
const tokens = await config.networks.reduce(async (promise: Promise<TokensCollection>, network: Network): Promise<TokensCollection> => {
|
||||||
const collection: TokensCollection = await promise;
|
const collection: TokensCollection = await promise;
|
||||||
const json = await httpRequest(network.tokens, 'json');
|
if (network.tokens) {
|
||||||
collection[network.shortcut] = json;
|
const json = await httpRequest(network.tokens, 'json');
|
||||||
|
collection[network.shortcut] = json;
|
||||||
|
}
|
||||||
return collection;
|
return collection;
|
||||||
}, Promise.resolve({}));
|
}, 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 => {
|
const loadStorageData = (): ThunkAction => (dispatch: Dispatch): void => {
|
||||||
// validate version
|
// validate version
|
||||||
|
Loading…
Reference in New Issue
Block a user