mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-02-19 22:38:12 +00:00
* Convert Swap to consistent style * Generate wallet reducer cleanup. * Confirm empty action in swap reducer * Union types. Fix gen wallet collision * Fix not using all actions in reducer. Added reducer state for is fetching from bity. Added todo to make that a loader. * Readme instructions. * Remove common action constants. * Bring all actions and reducers inline with readme instructions. * Readme fixes * address comments
32 lines
663 B
JavaScript
32 lines
663 B
JavaScript
// @flow
|
|
import type { Token } from 'config/data';
|
|
|
|
/*** Add custom token ***/
|
|
export type AddCustomTokenAction = {
|
|
type: 'CUSTOM_TOKEN_ADD',
|
|
payload: Token
|
|
};
|
|
|
|
export function addCustomToken(payload: Token): AddCustomTokenAction {
|
|
return {
|
|
type: 'CUSTOM_TOKEN_ADD',
|
|
payload
|
|
};
|
|
}
|
|
|
|
/*** Remove Custom Token ***/
|
|
export type RemoveCustomTokenAction = {
|
|
type: 'CUSTOM_TOKEN_REMOVE',
|
|
payload: string
|
|
};
|
|
|
|
export function removeCustomToken(payload: string): RemoveCustomTokenAction {
|
|
return {
|
|
type: 'CUSTOM_TOKEN_REMOVE',
|
|
payload
|
|
};
|
|
}
|
|
|
|
/*** Union Type ***/
|
|
export type CustomTokenAction = AddCustomTokenAction | RemoveCustomTokenAction;
|