-
Notifications
You must be signed in to change notification settings - Fork 465
Remove optimization from matchOrdersAsync in Exchange wrapper #1514
Conversation
@abandeali1 Does that mean that the order hashes on-chain now are gonna be correct and there will be no false InvalidSignature errors? |
@LogvinovLeon what was the issue before? People accidentally hashing orders with the |
The issue was that if you submit two orders with asset data: |
I see, that unfortunately will continue to be a problem until this logic is removed from the contracts as well. |
Description
matchOrdersAsync
would modify therightOrder
object passed in. Subsequent uses of this object would result in unexpected behaviour (invalid signature, different orderHash, different orderInfo).With the new ABI Encoder we use internally this optimisation is no longer required as the rightOrder will contain a pointer to the leftOrder assetData.
Thanks @arikan for pointing this out.
Testing instructions
Types of changes
Checklist:
[WIP]
if necessary.