diff options
author | Amir Bandeali <abandeali1@gmail.com> | 2019-02-02 06:55:36 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2019-02-06 01:23:09 +0800 |
commit | 1ada6796631ad4e281423407f6eb2602a16f119e (patch) | |
tree | 68739c29fe58c5959ae8c04623d7e94a171ce0ac /packages/order-utils/src | |
parent | 95526767836c81949213da7e1c44d4e02fdffc71 (diff) | |
download | dexon-0x-contracts-1ada6796631ad4e281423407f6eb2602a16f119e.tar.gz dexon-0x-contracts-1ada6796631ad4e281423407f6eb2602a16f119e.tar.zst dexon-0x-contracts-1ada6796631ad4e281423407f6eb2602a16f119e.zip |
Update ZeroExTransactionSchema
Diffstat (limited to 'packages/order-utils/src')
-rw-r--r-- | packages/order-utils/src/eip712_utils.ts | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/packages/order-utils/src/eip712_utils.ts b/packages/order-utils/src/eip712_utils.ts index 385fda989..646d9e301 100644 --- a/packages/order-utils/src/eip712_utils.ts +++ b/packages/order-utils/src/eip712_utils.ts @@ -63,11 +63,8 @@ export const eip712Utils = { * @param exchangeAddress The address of the exchange contract * @return A typed data object */ - createZeroExTransactionTypedData: ( - zeroExTransaction: ZeroExTransaction, - exchangeAddress: string, - ): EIP712TypedData => { - assert.isETHAddressHex('exchangeAddress', exchangeAddress); + createZeroExTransactionTypedData: (zeroExTransaction: ZeroExTransaction): EIP712TypedData => { + assert.isETHAddressHex('verifyingContractAddress', zeroExTransaction.verifyingContractAddress); assert.doesConformToSchema('zeroExTransaction', zeroExTransaction, schemas.zeroExTransactionSchema); const normalizedTransaction = _.mapValues(zeroExTransaction, value => { return !_.isString(value) ? value.toString() : value; @@ -76,7 +73,7 @@ export const eip712Utils = { constants.EIP712_ZEROEX_TRANSACTION_SCHEMA.name, { ZeroExTransaction: constants.EIP712_ZEROEX_TRANSACTION_SCHEMA.parameters }, normalizedTransaction, - exchangeAddress, + zeroExTransaction.verifyingContractAddress, ); return typedData; }, |