aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-10-13 05:52:18 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-10-13 05:52:18 +0800
commit025614a7fd297444cf47bb5134a83973983ef8a8 (patch)
treeb667a1eb9bcb5aefa0f526dd48ce81d00a8a4bac
parentf3391e1250767eb9ef7a74f78eded38fa3c94586 (diff)
downloaddexon-sol-tools-025614a7fd297444cf47bb5134a83973983ef8a8.tar
dexon-sol-tools-025614a7fd297444cf47bb5134a83973983ef8a8.tar.gz
dexon-sol-tools-025614a7fd297444cf47bb5134a83973983ef8a8.tar.bz2
dexon-sol-tools-025614a7fd297444cf47bb5134a83973983ef8a8.tar.lz
dexon-sol-tools-025614a7fd297444cf47bb5134a83973983ef8a8.tar.xz
dexon-sol-tools-025614a7fd297444cf47bb5134a83973983ef8a8.tar.zst
dexon-sol-tools-025614a7fd297444cf47bb5134a83973983ef8a8.zip
feat: Add AssetData type as union of ERC721AssetData and ERC20AssetData
-rw-r--r--packages/types/src/index.ts6
1 files changed, 4 insertions, 2 deletions
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',