diff options
author | Fabio Berger <me@fabioberger.com> | 2017-06-01 23:38:09 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-06-01 23:38:09 +0800 |
commit | 24a745092e0f7a626f5cbcfaef2e56567f0ace1d (patch) | |
tree | 04593ccd79ce1a7657c5c858fc54608dc2c68986 /test/utils | |
parent | 7ff0f677a12386a119bcadbdabd0721f9fc4cbce (diff) | |
download | dexon-sol-tools-24a745092e0f7a626f5cbcfaef2e56567f0ace1d.tar dexon-sol-tools-24a745092e0f7a626f5cbcfaef2e56567f0ace1d.tar.gz dexon-sol-tools-24a745092e0f7a626f5cbcfaef2e56567f0ace1d.tar.bz2 dexon-sol-tools-24a745092e0f7a626f5cbcfaef2e56567f0ace1d.tar.lz dexon-sol-tools-24a745092e0f7a626f5cbcfaef2e56567f0ace1d.tar.xz dexon-sol-tools-24a745092e0f7a626f5cbcfaef2e56567f0ace1d.tar.zst dexon-sol-tools-24a745092e0f7a626f5cbcfaef2e56567f0ace1d.zip |
Stop passing exchangeAddress into getOrderHash and instead get it from the artifacts
Diffstat (limited to 'test/utils')
-rw-r--r-- | test/utils/order_factory.ts | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/test/utils/order_factory.ts b/test/utils/order_factory.ts index 3195803ad..941056c7e 100644 --- a/test/utils/order_factory.ts +++ b/test/utils/order_factory.ts @@ -16,8 +16,6 @@ export const orderFactory = { takerTokenAmount: BigNumber.BigNumber|number, takerTokenAddress: string, expirationUnixTimestampSec?: BigNumber.BigNumber): Promise<SignedOrder> { - // TODO refactor and check - const exchangeAddress: string = (ExchangeArtifacts as any).networks[networkId].address; const INF_TIMESTAMP = new BigNumber(2524604400); expirationUnixTimestampSec = _.isUndefined(expirationUnixTimestampSec) ? INF_TIMESTAMP : @@ -35,7 +33,7 @@ export const orderFactory = { feeRecipient: constants.NULL_ADDRESS, expirationUnixTimestampSec, }; - const orderHash = ZeroEx.getOrderHashHex(exchangeAddress, order); + const orderHash = await zeroEx.getOrderHashHexAsync(order); const ecSignature = await zeroEx.signOrderHashAsync(orderHash); const signedOrder: SignedOrder = _.assign(order, {ecSignature}); return signedOrder; |