From 32ee758af2709f9b3d19d0acec28ac78b06c1bb8 Mon Sep 17 00:00:00 2001 From: Szymon Lesisz Date: Wed, 2 Jan 2019 11:38:44 +0100 Subject: [PATCH] get decimals from config (RippleBlockchainActions) --- src/actions/ripple/BlockchainActions.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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