diff options
Diffstat (limited to 'packages/instant/src/types.ts')
-rw-r--r-- | packages/instant/src/types.ts | 36 |
1 files changed, 30 insertions, 6 deletions
diff --git a/packages/instant/src/types.ts b/packages/instant/src/types.ts index d150bd8ab..bf3ee392f 100644 --- a/packages/instant/src/types.ts +++ b/packages/instant/src/types.ts @@ -1,9 +1,33 @@ -export enum ActionTypes { - UPDATE_ETH_USD_PRICE, - UPDATE_SELECTED_ASSET_AMOUNT, +import { AssetProxyId, ObjectMap } from '@0xproject/types'; + +// Reusable +export enum AsyncProcessState { + NONE, + PENDING, + SUCCESS, + FAILURE, +} + +export type FunctionType = (...args: any[]) => any; +export type ActionCreatorsMapObject = ObjectMap<FunctionType>; +export type ActionsUnion<A extends ActionCreatorsMapObject> = ReturnType<A[keyof A]>; + +export interface ERC20AssetMetaData { + assetProxyId: AssetProxyId.ERC20; + decimals: number; + primaryColor?: string; + symbol: string; } -export interface Action { - type: ActionTypes; - data?: any; +export interface ERC721AssetMetaData { + assetProxyId: AssetProxyId.ERC721; + name: string; + primaryColor?: string; +} + +export type AssetMetaData = ERC20AssetMetaData | ERC721AssetMetaData; + +export enum Network { + Kovan = 42, + Mainnet = 1, } |