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

Fixed BigNumber.js scoping #1312

Merged
merged 2 commits into from
Nov 25, 2024
Merged

Conversation

MiroMargineanu
Copy link
Contributor

Issue

The BigNumber configuration was not properly cleaned up in the stringIsFloat helper function, thus overwriting the configuration in other helper functions too, creating a race condition.

Reproduce

Issue exists on version 3.0.12 of sdk-dapp.

Root cause

The cause was the BigNumber.set method called globally in the stringIsFloat helper function.

Fix

Create a clone of the BigNumber instance and scope it locally, and only change the settings at a local function level.

Contains breaking changes

  • No
  • Yes

Updated CHANGELOG

  • No
  • Yes

Testing

  • User testing
  • Unit tests

@MiroMargineanu MiroMargineanu self-assigned this Nov 25, 2024
Copy link
Contributor

@arhtudormorar arhtudormorar left a comment

Choose a reason for hiding this comment

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

changelog

@MiroMargineanu MiroMargineanu added the bug Something isn't working label Nov 25, 2024
@arhtudormorar arhtudormorar merged commit b1333a9 into development Nov 25, 2024
2 checks passed
@arhtudormorar arhtudormorar deleted the mm-fix-bigNumber-context branch November 25, 2024 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants