diff --git a/src/actions/profilesActions.ts b/src/actions/profilesActions.ts index 24d02089b..b648dee05 100644 --- a/src/actions/profilesActions.ts +++ b/src/actions/profilesActions.ts @@ -106,12 +106,11 @@ async function get3Box(accountAddress: Address, dispatch: any, state: any, withS if (updateState) { /** * This is synchronous. - * Has the annoying side-effect of deleting the threeBox and threeBoxSpace properties in the payload. */ dispatch({ type: ActionTypes.SAVE_THREEBOX, sequence: AsyncActionSequence.Success, - payload: { ...result }, + payload: result, }); } diff --git a/src/reducers/profilesReducer.ts b/src/reducers/profilesReducer.ts index b054a29a6..1ffc7bc01 100644 --- a/src/reducers/profilesReducer.ts +++ b/src/reducers/profilesReducer.ts @@ -72,7 +72,7 @@ const profilesReducer = ( switch (action.type) { case ActionTypes.SAVE_THREEBOX: { const threeBoxPayload = action.payload as I3BoxState; - let newState: I3BoxState; + const newState: I3BoxState = {}; if (threeBoxPayload && threeBoxPayload.threeBox) { Object.assign(newState, update(state, { threeBox: { $set: threeBoxPayload.threeBox } })); }