aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/redux/reducer.ts
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-06-23 02:54:37 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-06-23 02:54:37 +0800
commit2409afae952bc5f8eb5ffa2346cd5220a1bcce00 (patch)
treefed56a63b97d0230e3f360d2236f7b4879beac32 /packages/website/ts/redux/reducer.ts
parent06705f9e88c5b8901e4edea08ffed92c8c6808f6 (diff)
parentb097193486a07ae52bcac591438a007499d96275 (diff)
downloaddexon-sol-tools-2409afae952bc5f8eb5ffa2346cd5220a1bcce00.tar
dexon-sol-tools-2409afae952bc5f8eb5ffa2346cd5220a1bcce00.tar.gz
dexon-sol-tools-2409afae952bc5f8eb5ffa2346cd5220a1bcce00.tar.bz2
dexon-sol-tools-2409afae952bc5f8eb5ffa2346cd5220a1bcce00.tar.lz
dexon-sol-tools-2409afae952bc5f8eb5ffa2346cd5220a1bcce00.tar.xz
dexon-sol-tools-2409afae952bc5f8eb5ffa2346cd5220a1bcce00.tar.zst
dexon-sol-tools-2409afae952bc5f8eb5ffa2346cd5220a1bcce00.zip
Merge https://github.com/0xProject/0x-monorepo into v2-prototype
Diffstat (limited to 'packages/website/ts/redux/reducer.ts')
-rw-r--r--packages/website/ts/redux/reducer.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/website/ts/redux/reducer.ts b/packages/website/ts/redux/reducer.ts
index 9d3d8f7d9..ed6a4868e 100644
--- a/packages/website/ts/redux/reducer.ts
+++ b/packages/website/ts/redux/reducer.ts
@@ -156,7 +156,7 @@ export function reducer(state: State = INITIAL_STATE, action: Action): State {
}
case ActionTypes.AddTokenToTokenByAddress: {
- const newTokenByAddress = state.tokenByAddress;
+ const newTokenByAddress = { ...state.tokenByAddress };
newTokenByAddress[action.data.address] = action.data;
return {
...state,
@@ -165,7 +165,7 @@ export function reducer(state: State = INITIAL_STATE, action: Action): State {
}
case ActionTypes.RemoveTokenFromTokenByAddress: {
- const newTokenByAddress = state.tokenByAddress;
+ const newTokenByAddress = { ...state.tokenByAddress };
delete newTokenByAddress[action.data.address];
return {
...state,
@@ -174,7 +174,7 @@ export function reducer(state: State = INITIAL_STATE, action: Action): State {
}
case ActionTypes.UpdateTokenByAddress: {
- const tokenByAddress = state.tokenByAddress;
+ const tokenByAddress = { ...state.tokenByAddress };
const tokens = action.data;
_.each(tokens, token => {
const updatedToken = {
@@ -253,7 +253,7 @@ export function reducer(state: State = INITIAL_STATE, action: Action): State {
}
case ActionTypes.UpdateChosenAssetTokenAddress: {
- const newAssetToken = state.sideToAssetToken[action.data.side];
+ const newAssetToken = { ...state.sideToAssetToken[action.data.side] };
newAssetToken.address = action.data.address;
const newSideToAssetToken = {
...state.sideToAssetToken,