diff --git a/src/routes/safe/component/Safe/BalanceInfo.jsx b/src/routes/safe/component/Safe/BalanceInfo.jsx index 94d7087e..db679d89 100644 --- a/src/routes/safe/component/Safe/BalanceInfo.jsx +++ b/src/routes/safe/component/Safe/BalanceInfo.jsx @@ -54,11 +54,7 @@ const BalanceComponent = openHoc(({ {name} - + ) })} diff --git a/src/routes/safe/store/reducer/balances.js b/src/routes/safe/store/reducer/balances.js index a70f1fd2..2bad95d0 100644 --- a/src/routes/safe/store/reducer/balances.js +++ b/src/routes/safe/store/reducer/balances.js @@ -10,5 +10,11 @@ export type State = Map> export default handleActions({ [ADD_BALANCES]: (state: State, action: ActionType): State => - state.set(action.payload.safeAddress, action.payload.balances), + state.update(action.payload.safeAddress, (prevSafe: Map) => { + if (!prevSafe) { + return action.payload.balances + } + + return prevSafe.equals(action.payload.balances) ? prevSafe : action.payload.balances + }), }, Map())