From 025614a7fd297444cf47bb5134a83973983ef8a8 Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 12 Oct 2018 14:52:18 -0700 Subject: feat: Add AssetData type as union of ERC721AssetData and ERC20AssetData --- packages/types/src/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'packages') diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index 6bc966ba1..ff4c6f0cc 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -158,16 +158,18 @@ export enum AssetProxyId { } export interface ERC20AssetData { - assetProxyId: string; + assetProxyId: AssetProxyId.ERC20; tokenAddress: string; } export interface ERC721AssetData { - assetProxyId: string; + assetProxyId: AssetProxyId.ERC721; tokenAddress: string; tokenId: BigNumber; } +export type AssetData = ERC20AssetData | ERC721AssetData; + // TODO: DRY. These should be extracted from contract code. export enum RevertReason { OrderUnfillable = 'ORDER_UNFILLABLE', -- cgit v1.2.3