mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-01-12 03:54:13 +00:00
1aad9d1c21
* 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
48 lines
875 B
JavaScript
48 lines
875 B
JavaScript
// @flow
|
|
|
|
/*** Change Language ***/
|
|
export type ChangeLanguageAction = {
|
|
type: 'CONFIG_LANGUAGE_CHANGE',
|
|
value: string
|
|
};
|
|
|
|
export function changeLanguage(sign: string): ChangeLanguageAction {
|
|
return {
|
|
type: 'CONFIG_LANGUAGE_CHANGE',
|
|
value: sign
|
|
};
|
|
}
|
|
|
|
/*** Change Node ***/
|
|
export type ChangeNodeAction = {
|
|
type: 'CONFIG_NODE_CHANGE',
|
|
// FIXME $keyof?
|
|
value: string
|
|
};
|
|
|
|
export function changeNode(value: string): ChangeNodeAction {
|
|
return {
|
|
type: 'CONFIG_NODE_CHANGE',
|
|
value
|
|
};
|
|
}
|
|
|
|
/*** Change gas price ***/
|
|
export type ChangeGasPriceAction = {
|
|
type: 'CONFIG_GAS_PRICE',
|
|
value: number
|
|
};
|
|
|
|
export function changeGasPrice(value: number): ChangeGasPriceAction {
|
|
return {
|
|
type: 'CONFIG_GAS_PRICE',
|
|
value
|
|
};
|
|
}
|
|
|
|
/*** Union Type ***/
|
|
export type ConfigAction =
|
|
| ChangeNodeAction
|
|
| ChangeLanguageAction
|
|
| ChangeGasPriceAction;
|