diff options
author | Fabio Berger <me@fabioberger.com> | 2018-11-09 07:46:07 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-11-09 07:46:07 +0800 |
commit | 57318a6ef22876a8c73321b7cc281302bbd67a3b (patch) | |
tree | 4a268712fb3c3359606a4c6d0280154f52cd15b3 /packages/order-utils/src | |
parent | 857a35d4f71c1c954033c3b0505250e18be21cfb (diff) | |
download | dexon-0x-contracts-57318a6ef22876a8c73321b7cc281302bbd67a3b.tar.gz dexon-0x-contracts-57318a6ef22876a8c73321b7cc281302bbd67a3b.tar.zst dexon-0x-contracts-57318a6ef22876a8c73321b7cc281302bbd67a3b.zip |
Remove unused validateFillOrKill method
Diffstat (limited to 'packages/order-utils/src')
-rw-r--r-- | packages/order-utils/src/order_validation_utils.ts | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/packages/order-utils/src/order_validation_utils.ts b/packages/order-utils/src/order_validation_utils.ts index 766fbaf0f..0af82f5cc 100644 --- a/packages/order-utils/src/order_validation_utils.ts +++ b/packages/order-utils/src/order_validation_utils.ts @@ -150,7 +150,7 @@ export class OrderValidationUtils { throw new Error('FULLY_FILLED'); } try { - OrderValidationUtils._validateOrderNotExpiredOrThrow(signedOrder.expirationTimeSeconds); + OrderValidationUtils._validateOrderNotExpiredOrThrow(signedOrder.expirationTimeSeconds); } catch (err) { throw new Error('EXPIRED'); } @@ -229,33 +229,4 @@ export class OrderValidationUtils { } return filledTakerTokenAmount; } - /** - * Validate a call to fillOrKillOrder and throw if it would fail - * @param exchangeTradeEmulator ExchangeTradeEmulator to use - * @param provider Web3 provider to use for JSON RPC requests - * @param signedOrder SignedOrder of interest - * @param fillTakerAssetAmount Amount we'd like to fill the order for - * @param takerAddress The taker of the order - * @param zrxAssetData ZRX asset data - */ - public async validateFillOrKillOrderThrowIfInvalidAsync( - exchangeTradeEmulator: ExchangeTransferSimulator, - provider: Provider, - signedOrder: SignedOrder, - fillTakerAssetAmount: BigNumber, - takerAddress: string, - zrxAssetData: string, - ): Promise<void> { - const filledTakerTokenAmount = await this.validateFillOrderThrowIfInvalidAsync( - exchangeTradeEmulator, - provider, - signedOrder, - fillTakerAssetAmount, - takerAddress, - zrxAssetData, - ); - if (filledTakerTokenAmount !== fillTakerAssetAmount) { - throw new Error(RevertReason.OrderUnfillable); - } - } } |