Rename EXPIRED to FILL_ORDER_EXPIRED
This commit is contained in:
@@ -133,7 +133,7 @@ export class ExchangeWrapper extends ContractWrapper {
|
||||
}
|
||||
const currentUnixTimestampSec = Date.now() / 1000;
|
||||
if (signedOrder.expirationUnixTimestampSec.lessThan(currentUnixTimestampSec)) {
|
||||
throw new Error(FillOrderValidationErrs.EXPIRED);
|
||||
throw new Error(FillOrderValidationErrs.FILL_ORDER_EXPIRED);
|
||||
}
|
||||
const zrxTokenAddress = await this.getZRXTokenAddressAsync();
|
||||
await this.validateFillOrderBalancesAndAllowancesAndThrowIfInvalidAsync(signedOrder, fillTakerAmount,
|
||||
|
||||
@@ -95,7 +95,7 @@ export type ExchangeContractErrs = keyof typeof ExchangeContractErrs;
|
||||
export const FillOrderValidationErrs = strEnum([
|
||||
'FILL_AMOUNT_IS_ZERO',
|
||||
'TRANSACTION_SENDER_IS_NOT_FILL_ORDER_TAKER',
|
||||
'EXPIRED',
|
||||
'FILL_ORDER_EXPIRED',
|
||||
'NOT_ENOUGH_TAKER_BALANCE',
|
||||
'NOT_ENOUGH_TAKER_ALLOWANCE',
|
||||
'NOT_ENOUGH_MAKER_BALANCE',
|
||||
|
||||
@@ -158,7 +158,7 @@ describe('ExchangeWrapper', () => {
|
||||
zeroEx.setTransactionSenderAccount(takerAddress);
|
||||
return expect(zeroEx.exchange.fillOrderAsync(
|
||||
signedOrder, fillTakerAmount, shouldCheckTransfer,
|
||||
)).to.be.rejectedWith(FillOrderValidationErrs.EXPIRED);
|
||||
)).to.be.rejectedWith(FillOrderValidationErrs.FILL_ORDER_EXPIRED);
|
||||
});
|
||||
describe('should throw when not enough balance or allowance to fulfill the order', () => {
|
||||
const fillableAmount = new BigNumber(5);
|
||||
|
||||
Reference in New Issue
Block a user