Remove the ability to clear tokenByAddress. It should simply be updated.
This commit is contained in:
@@ -121,11 +121,6 @@ export class Dispatcher {
|
||||
type: ActionTypes.RemoveTokenFromTokenByAddress,
|
||||
});
|
||||
}
|
||||
public clearTokenByAddress() {
|
||||
this._dispatch({
|
||||
type: ActionTypes.ClearTokenByAddress,
|
||||
});
|
||||
}
|
||||
public batchDispatch(tokens: Token[], networkId: number, userAddress: string, sideToAssetToken: SideToAssetToken) {
|
||||
this._dispatch({
|
||||
data: {
|
||||
|
@@ -140,13 +140,6 @@ export function reducer(state: State = INITIAL_STATE, action: Action) {
|
||||
};
|
||||
}
|
||||
|
||||
case ActionTypes.ClearTokenByAddress: {
|
||||
return {
|
||||
...state,
|
||||
tokenByAddress: {},
|
||||
};
|
||||
}
|
||||
|
||||
case ActionTypes.AddTokenToTokenByAddress: {
|
||||
const newTokenByAddress = state.tokenByAddress;
|
||||
newTokenByAddress[action.data.address] = action.data;
|
||||
|
Reference in New Issue
Block a user