Remove the ability to clear tokenByAddress. It should simply be updated.

This commit is contained in:
Fabio Berger
2018-01-29 17:56:35 +01:00
parent 5c2d725721
commit 8175c7c085
4 changed files with 0 additions and 14 deletions

View File

@@ -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: {

View File

@@ -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;