mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-01-12 20:14:12 +00:00
aabcd3f7a3
* Set default unit to 'ETH' instead of 'ether' * Use 'isEtherUnit()' everywhere * Set default unit to empty string * Update isEthUnit to isNetworkUnit * Fix unit conversion for non-ethereum networks * Set default network unit properly * Fix tests * fix typos * Update isNetworkUnit selector * Update isNetworkUnit * Fix validationhelpers tests * Add mock state to tests & Move isNetworkUnit to selectors * Fix validation helper spec * fix unit swap spec
27 lines
716 B
TypeScript
27 lines
716 B
TypeScript
import {
|
|
TypeKeys,
|
|
SetUnitMetaAction,
|
|
SetTokenValueMetaAction,
|
|
SetTokenToMetaAction
|
|
} from 'actions/transaction';
|
|
|
|
export type TSetTokenTo = typeof setTokenTo;
|
|
export const setTokenTo = (payload: SetTokenToMetaAction['payload']): SetTokenToMetaAction => ({
|
|
type: TypeKeys.TOKEN_TO_META_SET,
|
|
payload
|
|
});
|
|
|
|
export type TSetTokenValue = typeof setTokenValue;
|
|
export const setTokenValue = (
|
|
payload: SetTokenValueMetaAction['payload']
|
|
): SetTokenValueMetaAction => ({
|
|
type: TypeKeys.TOKEN_VALUE_META_SET,
|
|
payload
|
|
});
|
|
|
|
export type TSetUnitMeta = typeof setUnitMeta;
|
|
export const setUnitMeta = (payload: SetUnitMetaAction['payload']): SetUnitMetaAction => ({
|
|
type: TypeKeys.UNIT_META_SET,
|
|
payload
|
|
});
|