diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-12-15 02:23:01 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-12-15 07:34:45 +0800 |
commit | a3d93d17cdefc2258a9f08e6fc680df1fb2b8456 (patch) | |
tree | 0f074b7205b4026b0e3b9bd84c9d8a1257411757 /packages/asset-buyer/src/types.ts | |
parent | c6c45095a8511814db6aa33e39794ae60debad8b (diff) | |
download | dexon-sol-tools-a3d93d17cdefc2258a9f08e6fc680df1fb2b8456.tar dexon-sol-tools-a3d93d17cdefc2258a9f08e6fc680df1fb2b8456.tar.gz dexon-sol-tools-a3d93d17cdefc2258a9f08e6fc680df1fb2b8456.tar.bz2 dexon-sol-tools-a3d93d17cdefc2258a9f08e6fc680df1fb2b8456.tar.lz dexon-sol-tools-a3d93d17cdefc2258a9f08e6fc680df1fb2b8456.tar.xz dexon-sol-tools-a3d93d17cdefc2258a9f08e6fc680df1fb2b8456.tar.zst dexon-sol-tools-a3d93d17cdefc2258a9f08e6fc680df1fb2b8456.zip |
Factor in slippage amount in InsufficientAssetLiquidityError error, and show in instant
Diffstat (limited to 'packages/asset-buyer/src/types.ts')
-rw-r--r-- | packages/asset-buyer/src/types.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/asset-buyer/src/types.ts b/packages/asset-buyer/src/types.ts index dfa17a22d..d435f337e 100644 --- a/packages/asset-buyer/src/types.ts +++ b/packages/asset-buyer/src/types.ts @@ -118,10 +118,10 @@ export enum AssetBuyerError { } export class InsufficientAssetLiquidityError extends Error { - public numAssetsAvailable: BigNumber; - constructor(numAssetsAvailable: BigNumber) { + public amountAvailableToFill: BigNumber; + constructor(amountAvailableToFill: BigNumber) { super(AssetBuyerError.InsufficientAssetLiquidity); - this.numAssetsAvailable = numAssetsAvailable; + 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); } |