aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-06-02 23:40:06 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-06-02 23:40:06 +0800
commit7fd84e29ab8c27cb872cf8cd0f631d4b78abba0e (patch)
tree9442911d21d05f12c537a2aa537cff223e653b27
parentf5158eebf335c9fbcfb7cfb6f32a0ecd1161391d (diff)
downloaddexon-sol-tools-7fd84e29ab8c27cb872cf8cd0f631d4b78abba0e.tar
dexon-sol-tools-7fd84e29ab8c27cb872cf8cd0f631d4b78abba0e.tar.gz
dexon-sol-tools-7fd84e29ab8c27cb872cf8cd0f631d4b78abba0e.tar.bz2
dexon-sol-tools-7fd84e29ab8c27cb872cf8cd0f631d4b78abba0e.tar.lz
dexon-sol-tools-7fd84e29ab8c27cb872cf8cd0f631d4b78abba0e.tar.xz
dexon-sol-tools-7fd84e29ab8c27cb872cf8cd0f631d4b78abba0e.tar.zst
dexon-sol-tools-7fd84e29ab8c27cb872cf8cd0f631d4b78abba0e.zip
Rename EXPIRED to FILL_ORDER_EXPIRED
-rw-r--r--src/contract_wrappers/exchange_wrapper.ts2
-rw-r--r--src/types.ts2
-rw-r--r--test/exchange_wrapper_test.ts2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts
index 4c46404bb..e957530ae 100644
--- a/src/contract_wrappers/exchange_wrapper.ts
+++ b/src/contract_wrappers/exchange_wrapper.ts
@@ -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,
diff --git a/src/types.ts b/src/types.ts
index 6e1499a7c..e4a7da5d7 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -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',
diff --git a/test/exchange_wrapper_test.ts b/test/exchange_wrapper_test.ts
index d8934d409..e83134909 100644
--- a/test/exchange_wrapper_test.ts
+++ b/test/exchange_wrapper_test.ts
@@ -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);