diff options
author | Fabio Berger <me@fabioberger.com> | 2018-01-29 00:45:20 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-01-29 00:45:20 +0800 |
commit | 005a02efeb5ac874e1c1a4dd6679bfa3cc21b1b1 (patch) | |
tree | 63aebaf67a71d8587e19a684c394c0ea91b48116 /packages/website/ts/redux/reducer.ts | |
parent | 6206ebc994a2cf76b90ac426218d6ed18b74a072 (diff) | |
download | dexon-sol-tools-005a02efeb5ac874e1c1a4dd6679bfa3cc21b1b1.tar.gz dexon-sol-tools-005a02efeb5ac874e1c1a4dd6679bfa3cc21b1b1.tar.zst dexon-sol-tools-005a02efeb5ac874e1c1a4dd6679bfa3cc21b1b1.zip |
Fix bug where could not switch to Ledger and back
Diffstat (limited to 'packages/website/ts/redux/reducer.ts')
-rw-r--r-- | packages/website/ts/redux/reducer.ts | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/packages/website/ts/redux/reducer.ts b/packages/website/ts/redux/reducer.ts index cee475fa9..427a8dd4a 100644 --- a/packages/website/ts/redux/reducer.ts +++ b/packages/website/ts/redux/reducer.ts @@ -181,6 +181,25 @@ export function reducer(state: State = INITIAL_STATE, action: Action) { }; } + case ActionTypes.BatchDispatch: { + const tokenByAddress = state.tokenByAddress; + const tokens = action.data.tokens; + _.each(tokens, token => { + const updatedToken = { + ...tokenByAddress[token.address], + ...token, + }; + tokenByAddress[token.address] = updatedToken; + }); + return { + ...state, + networkId: action.data.networkId, + userAddress: action.data.userAddress, + sideToAssetToken: action.data.sideToAssetToken, + tokenByAddress, + }; + } + case ActionTypes.ForceTokenStateRefetch: return { ...state, |