diff --git a/src/actions/ripple/BlockchainActions.js b/src/actions/ripple/BlockchainActions.js index 6501d49f..8045268f 100644 --- a/src/actions/ripple/BlockchainActions.js +++ b/src/actions/ripple/BlockchainActions.js @@ -16,8 +16,6 @@ import type { BlockchainFeeLevel, } from 'flowtype'; -const DECIMALS: number = 6; - export const subscribe = (network: string): PromiseAction => async (dispatch: Dispatch, getState: GetState): Promise => { const accounts: Array = getState().accounts.filter(a => a.network === network).map(a => a.descriptor); await TrezorConnect.blockchainSubscribe({ @@ -92,6 +90,8 @@ export const onNotification = (payload: $ElementType a.descriptor === notification.address); if (!account) return; + const { network } = getState().selectedAccount; + if (!network) return; // flowtype fallback if (notification.status === 'pending') { dispatch({ @@ -101,9 +101,9 @@ export const onNotification = (payload: $ElementType