aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-utils
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-10-18 18:36:41 +0800
committerFabio Berger <me@fabioberger.com>2018-10-18 18:36:41 +0800
commit28863f9a6f8a28ddbfe588b9e4d03b1e31da6961 (patch)
treedb9bd874838a30ba82eacab0d4255fe3067eff94 /packages/order-utils
parent6ab6a9aa2b3511df60c078398168a84faf3e2385 (diff)
parentcdd650d0eb83153a992922c6ffff35b494f299d3 (diff)
downloaddexon-sol-tools-28863f9a6f8a28ddbfe588b9e4d03b1e31da6961.tar
dexon-sol-tools-28863f9a6f8a28ddbfe588b9e4d03b1e31da6961.tar.gz
dexon-sol-tools-28863f9a6f8a28ddbfe588b9e4d03b1e31da6961.tar.bz2
dexon-sol-tools-28863f9a6f8a28ddbfe588b9e4d03b1e31da6961.tar.lz
dexon-sol-tools-28863f9a6f8a28ddbfe588b9e4d03b1e31da6961.tar.xz
dexon-sol-tools-28863f9a6f8a28ddbfe588b9e4d03b1e31da6961.tar.zst
dexon-sol-tools-28863f9a6f8a28ddbfe588b9e4d03b1e31da6961.zip
merge dev-section-redesign
Diffstat (limited to 'packages/order-utils')
-rw-r--r--packages/order-utils/CHANGELOG.json4
-rw-r--r--packages/order-utils/package.json2
-rw-r--r--packages/order-utils/src/asset_data_utils.ts4
-rw-r--r--packages/order-utils/src/index.ts2
4 files changed, 8 insertions, 4 deletions
diff --git a/packages/order-utils/CHANGELOG.json b/packages/order-utils/CHANGELOG.json
index 5a0c0db47..9bf16ef2a 100644
--- a/packages/order-utils/CHANGELOG.json
+++ b/packages/order-utils/CHANGELOG.json
@@ -14,6 +14,10 @@
{
"note": "Rename `ecSignOrderHashAsync` to `ecSignHashAsync` removing `SignerType` parameter.",
"pr": 1102
+ },
+ {
+ "note": "Use `AssetData` union type for function return values.",
+ "pr": 1131
}
]
},
diff --git a/packages/order-utils/package.json b/packages/order-utils/package.json
index 50bc0f0a0..09eef849f 100644
--- a/packages/order-utils/package.json
+++ b/packages/order-utils/package.json
@@ -49,7 +49,7 @@
"shx": "^0.2.2",
"sinon": "^4.0.0",
"tslint": "5.11.0",
- "typedoc": "0.12.0",
+ "typedoc": "0.13.0",
"typescript": "3.0.1"
},
"dependencies": {
diff --git a/packages/order-utils/src/asset_data_utils.ts b/packages/order-utils/src/asset_data_utils.ts
index 0c0b59548..12c11bce9 100644
--- a/packages/order-utils/src/asset_data_utils.ts
+++ b/packages/order-utils/src/asset_data_utils.ts
@@ -1,4 +1,4 @@
-import { AssetProxyId, ERC20AssetData, ERC721AssetData } from '@0xproject/types';
+import { AssetData, AssetProxyId, ERC20AssetData, ERC721AssetData } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import ethAbi = require('ethereumjs-abi');
import ethUtil = require('ethereumjs-util');
@@ -112,7 +112,7 @@ export const assetDataUtils = {
* @param assetData Hex encoded assetData string to decode
* @return Either a ERC20 or ERC721 assetData object
*/
- decodeAssetDataOrThrow(assetData: string): ERC20AssetData | ERC721AssetData {
+ decodeAssetDataOrThrow(assetData: string): AssetData {
const assetProxyId = assetDataUtils.decodeAssetProxyId(assetData);
switch (assetProxyId) {
case AssetProxyId.ERC20:
diff --git a/packages/order-utils/src/index.ts b/packages/order-utils/src/index.ts
index dbb782b85..50b8a88a8 100644
--- a/packages/order-utils/src/index.ts
+++ b/packages/order-utils/src/index.ts
@@ -18,7 +18,6 @@ export { ExchangeTransferSimulator } from './exchange_transfer_simulator';
export { BalanceAndProxyAllowanceLazyStore } from './store/balance_and_proxy_allowance_lazy_store';
export { OrderFilledCancelledLazyStore } from './store/order_filled_cancelled_lazy_store';
-export { constants } from './constants';
export { eip712Utils } from './eip712_utils';
export {
@@ -35,6 +34,7 @@ export {
OrderRelevantState,
OrderState,
ECSignature,
+ AssetData,
ERC20AssetData,
ERC721AssetData,
AssetProxyId,