This repository has been archived by the owner on Jul 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 465
Add transactionHashUtils to order-utils package #1576
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abandeali1
changed the title
Add transactionHashUtils to order-utils package
[WIP] Add transactionHashUtils to order-utils package
Feb 2, 2019
abandeali1
force-pushed
the
feat/transaction-hash
branch
3 times, most recently
from
February 4, 2019 01:20
3f8141b
to
9a77c15
Compare
abandeali1
changed the title
[WIP] Add transactionHashUtils to order-utils package
Add transactionHashUtils to order-utils package
Feb 4, 2019
fabioberger
suggested changes
Feb 4, 2019
@@ -1,6 +1,7 @@ | |||
{ | |||
"id": "/zeroExTransactionSchema", | |||
"properties": { | |||
"verifyingContractAddress": { "$ref": "/addressSchema" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this required? If so, you should add it to the required array below.
} catch (error) { | ||
if (_.includes(error.message, INVALID_TAKER_FORMAT)) { | ||
const errMsg = | ||
'Order taker must be of type string. If you want anyone to be able to fill an order - pass ZeroEx.NULL_ADDRESS'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is ZeroEx.NULL_ADDRESS
still a thing? Someone just using @0x/order-utils
won't have that.
const typedData = eip712Utils.createZeroExTransactionTypedData(transaction); | ||
const transactionHashBuff = signTypedDataUtils.generateTypedDataHash(typedData); | ||
return transactionHashBuff; | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was any of this logic copy-pasted from the contract-wrappers
transaction utilities? If so, can we merge them and make sure it's all DRY?
abandeali1
force-pushed
the
feat/transaction-hash
branch
from
February 4, 2019 17:49
846fe11
to
760f31f
Compare
fabioberger
approved these changes
Feb 5, 2019
…rt of the 0x tx schema
abandeali1
force-pushed
the
feat/transaction-hash
branch
from
February 5, 2019 17:26
d51531b
to
af4ed0f
Compare
This was referenced Nov 30, 2023
This was referenced Dec 17, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
transactionHashUtils
to theorder-utils
package. The other way of hashing a tx is in thecontract-wrappers
package, but you really shouldn't require anexchange
instance to simply hash a transaction.createTypedData
to override the default.Testing instructions
Types of changes
Checklist:
[WIP]
if necessary.