diff options
Diffstat (limited to 'packages/instant/src/redux/reducer.ts')
-rw-r--r-- | packages/instant/src/redux/reducer.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/instant/src/redux/reducer.ts b/packages/instant/src/redux/reducer.ts index 28f094184..3d7c3f483 100644 --- a/packages/instant/src/redux/reducer.ts +++ b/packages/instant/src/redux/reducer.ts @@ -74,13 +74,16 @@ export const createReducer = (initialState: State) => { return reduceStateWithAccount(state, LOCKED_ACCOUNT); case ActionTypes.SET_ACCOUNT_STATE_READY: { const address = action.data; - const newAccount: AccountReady = { + let newAccount: AccountReady = { state: AccountState.Ready, address, }; const currentAccount = state.providerState.account; if (currentAccount.state === AccountState.Ready && currentAccount.address === address) { - newAccount.ethBalanceInWei = currentAccount.ethBalanceInWei; + newAccount = { + ...newAccount, + ethBalanceInWei: currentAccount.ethBalanceInWei, + }; } return reduceStateWithAccount(state, newAccount); } |