diff options
Diffstat (limited to 'packages/order-utils')
-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); - } - } } |