Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes underflow when try to use fractional ETH as number in orders #1031

Merged
merged 2 commits into from Jun 8, 2023

Conversation

JoshuaSchmidt-OpenSea
Copy link
Contributor

Motivation

Fixes #1022

Solution

BigNumberish was being parsed as FixedNumber and cast to string. Instead casted BigNumberish to string directly.

Testing

Changed integration tests to use numbers instead of strings.

@JoshuaSchmidt-OpenSea JoshuaSchmidt-OpenSea requested review from ryanio and a team June 8, 2023 04:31
@@ -34,7 +34,7 @@ suite("SDK: order posting", () => {

const sellOrder = {
accountAddress: walletAddress,
startAmount: LISTING_AMOUNT,
startAmount: +LISTING_AMOUNT,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe keep one as a string or it might be smart to test all variations of bignumberish inputs to ensure their resulting values are equal

@JoshuaSchmidt-OpenSea JoshuaSchmidt-OpenSea merged commit 8facda0 into main Jun 8, 2023
8 checks passed
@JoshuaSchmidt-OpenSea JoshuaSchmidt-OpenSea deleted the fixParsingFractionalNumbers branch June 8, 2023 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Number underflow when try to use fractional ETH in order
3 participants