1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-24 09:18:09 +00:00

fix for "selectedAccount" observe action

added all BLOCKCHAIN events from 'trezor-connect' (example: disconnect)
and explicly SEND.TX_COMPLETE which create a pending transaction
This commit is contained in:
Szymon Lesisz 2018-10-03 14:44:19 +02:00
parent 647d196e1e
commit 4d99577fa7

View File

@ -1,10 +1,12 @@
/* @flow */
import { LOCATION_CHANGE } from 'react-router-redux';
import { BLOCKCHAIN } from 'trezor-connect';
import * as WALLET from 'actions/constants/wallet';
import * as ACCOUNT from 'actions/constants/account';
import * as DISCOVERY from 'actions/constants/discovery';
import * as TOKEN from 'actions/constants/token';
import * as PENDING from 'actions/constants/pendingTx';
import * as SEND from 'actions/constants/send';
import * as reducerUtils from 'reducers/utils';
@ -150,6 +152,8 @@ const getAccountStatus = (state: State, selectedAccount: SelectedAccountState):
// other actions will be ignored
const actions = [
LOCATION_CHANGE,
...Object.values(BLOCKCHAIN).filter(v => typeof v === 'string'),
SEND.TX_COMPLETE,
WALLET.SET_SELECTED_DEVICE,
WALLET.UPDATE_SELECTED_DEVICE,
...Object.values(ACCOUNT).filter(v => typeof v === 'string' && v !== ACCOUNT.UPDATE_SELECTED_ACCOUNT), // exported values got unwanted "__esModule: true" as first element