aboutsummaryrefslogtreecommitdiffstats
path: root/packages/asset-buyer/src/types.ts
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-12-15 07:18:20 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-12-15 07:34:45 +0800
commit69054d85e80f9e41200015a9b0eef2a9fe00f439 (patch)
treec8296279c2f51518940cc772a26e626f5931e9de /packages/asset-buyer/src/types.ts
parent3e596f6a8c211eb39917cfd2a9a68a6facf2c904 (diff)
downloaddexon-sol-tools-69054d85e80f9e41200015a9b0eef2a9fe00f439.tar
dexon-sol-tools-69054d85e80f9e41200015a9b0eef2a9fe00f439.tar.gz
dexon-sol-tools-69054d85e80f9e41200015a9b0eef2a9fe00f439.tar.bz2
dexon-sol-tools-69054d85e80f9e41200015a9b0eef2a9fe00f439.tar.lz
dexon-sol-tools-69054d85e80f9e41200015a9b0eef2a9fe00f439.tar.xz
dexon-sol-tools-69054d85e80f9e41200015a9b0eef2a9fe00f439.tar.zst
dexon-sol-tools-69054d85e80f9e41200015a9b0eef2a9fe00f439.zip
Only send in amountAvailableToFill if it's a non-zero amount, add additional tests and nest, and put error into its own file
Diffstat (limited to 'packages/asset-buyer/src/types.ts')
-rw-r--r--packages/asset-buyer/src/types.ts12
1 files changed, 1 insertions, 11 deletions
diff --git a/packages/asset-buyer/src/types.ts b/packages/asset-buyer/src/types.ts
index d435f337e..d5d6be695 100644
--- a/packages/asset-buyer/src/types.ts
+++ b/packages/asset-buyer/src/types.ts
@@ -102,7 +102,7 @@ export interface AssetBuyerOpts {
}
/**
- * Possible errors thrown by an AssetBuyer instance or associated static methods.
+ * Possible error messages thrown by an AssetBuyer instance or associated static methods.
*/
export enum AssetBuyerError {
NoEtherTokenContractFound = 'NO_ETHER_TOKEN_CONTRACT_FOUND',
@@ -117,16 +117,6 @@ export enum AssetBuyerError {
TransactionValueTooLow = 'TRANSACTION_VALUE_TOO_LOW',
}
-export class InsufficientAssetLiquidityError extends Error {
- public amountAvailableToFill: BigNumber;
- constructor(amountAvailableToFill: BigNumber) {
- super(AssetBuyerError.InsufficientAssetLiquidity);
- this.amountAvailableToFill = amountAvailableToFill;
- // Setting prototype so instanceof works. See https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work
- Object.setPrototypeOf(this, InsufficientAssetLiquidityError.prototype);
- }
-}
-
export interface OrdersAndFillableAmounts {
orders: SignedOrder[];
remainingFillableMakerAssetAmounts: BigNumber[];