-
Notifications
You must be signed in to change notification settings - Fork 465
order-utils: Order Interface can't handle large salts #1670
Comments
Come to think of this, this probably effects all BigNumber interfaces. Not just the salt |
@aakilfernandes have you tried passing it in as a string rather then as a number type? That should work, although I agree that it's inelegant. |
@fabioberger you mean a hexadecimal encoding? The typescript interface only allows for bignumbers |
@aakilfernandes which method call and order is giving you this error? Mind posting both of them here? |
https://github.com/GuildCrypt/makerfacility/blob/master/test/setSignatures.js#L29-L33 The error only shows up for large salts
|
I see you are using your own BigNumber dep. Do you configure it with:
? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically closed because no activity occured in 7 days after being marked as stale. If it's still relevant - feel free to reopen. Thank you for your contributions. |
Expected Behavior
Create an order interface with a salt of 2^256 - 1
Current Behavior
Validation errors: instance.salt is not any of [subschema 0],[subschema 1]
Possible Solution
Replace Order interface to accept hex strings (alternatively, use BN.js which I believe can handle numbers that large)
Your Environment
node v10.0.0
| Package | Version |
|
0x.js
| 6.0.3 |The text was updated successfully, but these errors were encountered: