aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/redux/reducer.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-01-30 18:16:13 +0800
committerFabio Berger <me@fabioberger.com>2018-01-30 18:16:13 +0800
commit86cc011212088801a778d947ae925cc0b1ddadf8 (patch)
tree9c12a4dc945d3dd23416d4ea1ccde438c9ed687e /packages/website/ts/redux/reducer.ts
parentc0facfc28f65495a52f9405613fe4a08aff5d164 (diff)
downloaddexon-0x-contracts-86cc011212088801a778d947ae925cc0b1ddadf8.tar.gz
dexon-0x-contracts-86cc011212088801a778d947ae925cc0b1ddadf8.tar.zst
dexon-0x-contracts-86cc011212088801a778d947ae925cc0b1ddadf8.zip
Wholesale replace the tokenByAddress and de-dup properly
Diffstat (limited to 'packages/website/ts/redux/reducer.ts')
-rw-r--r--packages/website/ts/redux/reducer.ts11
1 files changed, 1 insertions, 10 deletions
diff --git a/packages/website/ts/redux/reducer.ts b/packages/website/ts/redux/reducer.ts
index f94da003f..4b5a9138f 100644
--- a/packages/website/ts/redux/reducer.ts
+++ b/packages/website/ts/redux/reducer.ts
@@ -175,21 +175,12 @@ 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,
+ tokenByAddress: action.data.tokenByAddress,
};
}