Fix bug where could not switch to Ledger and back
This commit is contained in:
@@ -181,6 +181,25 @@ export function reducer(state: State = INITIAL_STATE, action: Action) {
|
||||
};
|
||||
}
|
||||
|
||||
case ActionTypes.BatchDispatch: {
|
||||
const tokenByAddress = state.tokenByAddress;
|
||||
const tokens = action.data.tokens;
|
||||
_.each(tokens, token => {
|
||||
const updatedToken = {
|
||||
...tokenByAddress[token.address],
|
||||
...token,
|
||||
};
|
||||
tokenByAddress[token.address] = updatedToken;
|
||||
});
|
||||
return {
|
||||
...state,
|
||||
networkId: action.data.networkId,
|
||||
userAddress: action.data.userAddress,
|
||||
sideToAssetToken: action.data.sideToAssetToken,
|
||||
tokenByAddress,
|
||||
};
|
||||
}
|
||||
|
||||
case ActionTypes.ForceTokenStateRefetch:
|
||||
return {
|
||||
...state,
|
||||
|
Reference in New Issue
Block a user