aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/redux
diff options
context:
space:
mode:
Diffstat (limited to 'packages/website/ts/redux')
-rw-r--r--packages/website/ts/redux/reducer.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/website/ts/redux/reducer.ts b/packages/website/ts/redux/reducer.ts
index 2f3150f92..a628f65c2 100644
--- a/packages/website/ts/redux/reducer.ts
+++ b/packages/website/ts/redux/reducer.ts
@@ -184,10 +184,11 @@ export function reducer(state: State = INITIAL_STATE, action: Action) {
}
case ActionTypes.BatchDispatch: {
+ const userAddress = _.isUndefined(action.data.userAddressIfExists) ? '' : action.data.userAddressIfExists;
return {
...state,
networkId: action.data.networkId,
- userAddress: _.isUndefined(action.data.userAddress) ? '' : action.data.userAddress,
+ userAddress,
sideToAssetToken: action.data.sideToAssetToken,
tokenByAddress: action.data.tokenByAddress,
};
@@ -284,9 +285,10 @@ export function reducer(state: State = INITIAL_STATE, action: Action) {
}
case ActionTypes.UpdateUserAddress: {
+ const userAddress = _.isUndefined(action.data) ? '' : action.data;
return {
...state,
- userAddress: _.isUndefined(action.data) ? '' : action.data,
+ userAddress,
};
}