mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-28 03:08:30 +00:00
disable BlockchainActions for non-ethereum networks
This commit is contained in:
parent
0918403024
commit
c66383ddba
@ -93,6 +93,7 @@ export const onBlockMined = (coinInfo: any): PromiseAction<void> => async (dispa
|
||||
// incoming "coinInfo" from TrezorConnect is CoinInfo | EthereumNetwork type
|
||||
const network: string = coinInfo.shortcut.toLowerCase();
|
||||
|
||||
if (network !== 'ethereum') return;
|
||||
// try to resolve pending transactions
|
||||
await dispatch(Web3Actions.resolvePendingTransactions(network));
|
||||
|
||||
@ -175,8 +176,11 @@ export const subscribe = (network: string): PromiseAction<void> => async (dispat
|
||||
accounts: [],
|
||||
coin: network,
|
||||
});
|
||||
// init web3 instance if not exists
|
||||
await dispatch(Web3Actions.initWeb3(network));
|
||||
|
||||
if (network === 'ethereum') {
|
||||
// init web3 instance if not exists
|
||||
await dispatch(Web3Actions.initWeb3(network));
|
||||
}
|
||||
};
|
||||
|
||||
// Conditionally subscribe to blockchain backend
|
||||
|
Loading…
Reference in New Issue
Block a user