From 2a6d93eaa4505515d1b2691fd3a027fa797b4cf2 Mon Sep 17 00:00:00 2001 From: skubakdj Date: Thu, 16 Nov 2017 13:16:09 -0500 Subject: [PATCH] Unset Web3 Node on Wallet Reset (#409) * unset web3 node on wallet reset * use wallet TypeKeys enum instead of strings --- common/sagas/config.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/sagas/config.ts b/common/sagas/config.ts index 1e17f544..9f94e11a 100644 --- a/common/sagas/config.ts +++ b/common/sagas/config.ts @@ -15,6 +15,7 @@ import { getNode, getNodeConfig } from 'selectors/config'; import { getWalletInst } from 'selectors/wallet'; import { AppState } from 'reducers'; import { TypeKeys } from 'actions/config/constants'; +import { TypeKeys as WalletTypeKeys } from 'actions/wallet/constants'; import { toggleOfflineConfig, changeNode, @@ -106,5 +107,6 @@ export default function* configSaga(): SagaIterator { ); yield takeEvery(TypeKeys.CONFIG_NODE_CHANGE_INTENT, handleNodeChangeIntent); yield takeEvery(TypeKeys.CONFIG_LANGUAGE_CHANGE, reload); - yield takeEvery('WALLET_SET', unsetWeb3Node); + yield takeEvery(WalletTypeKeys.WALLET_SET, unsetWeb3Node); + yield takeEvery(WalletTypeKeys.WALLET_RESET, unsetWeb3Node); }