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

[IMPROVEMENT] safeNumberToBN Method #4634

Merged
merged 12 commits into from
Aug 5, 2022
Merged

[IMPROVEMENT] safeNumberToBN Method #4634

merged 12 commits into from
Aug 5, 2022

Conversation

gantunesr
Copy link
Member

@gantunesr gantunesr commented Jul 6, 2022

Description

Currently there's an issue in the app where a value 0xNaN is getting passed to the method safeNumberToBN. This PR improve the logic of the method to avoid the error and expands the testing around it to minimize the probability of those errors occurring again. The next step after this development is to check where the 0xNaN is getting originated.

Screenshots/Recordings

NA

Issue

Progresses https://github.com/MetaMask/mobile-planning/issues/313

Checklist

  • There is a related GitHub issue
  • Tests are included if applicable
  • Any added code is fully documented

@gantunesr gantunesr requested a review from a team as a code owner July 6, 2022 21:15
@gantunesr gantunesr added needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) stability-team labels Jul 6, 2022
Copy link
Contributor

@Fatxx Fatxx left a comment

Choose a reason for hiding this comment

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

LGTM

@gantunesr gantunesr added needs-qa Any New Features that needs a full manual QA prior to being added to a release. Mobile QA board and removed needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) labels Jul 8, 2022
@gantunesr gantunesr added the release-5.5.0 PRs for v5.5.0 release label Jul 12, 2022
@sethkfman sethkfman added release-5.6.0 PRs for v5.6.0 release and removed release-5.5.0 PRs for v5.5.0 release labels Jul 26, 2022
@AlexHerman1 AlexHerman1 added CS-reported issues reported by CS CS-tracking issues being tracked by / relevant to CS labels Jul 28, 2022
@cortisiko cortisiko added QA in Progress QA has started on the feature. and removed needs-qa Any New Features that needs a full manual QA prior to being added to a release. labels Aug 4, 2022
Copy link
Member

@cortisiko cortisiko left a comment

Choose a reason for hiding this comment

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

Things I tested:

  • Sending ERC-20 tokens (integer amount and decimals)
  • Swapping ERC-20 to ERC-20
  • Swapping Native to ERC-20
  • Speeding up/ cancelling transactions
  • Setting custom gas limits, max priority fees on transactions
  • Deploying contracts
  • Approving contracts (I edited the custom limits to be non-integer)
  • Keystone transactions: sending tokens, minting NFT’s
  • I verified that [FIX] Fixes renderFromGwei related crashes #3538 did not regress.

With that being said, This PR is 🌮 🌮

@cortisiko cortisiko added QA Passed A successful QA run through has been done and removed QA in Progress QA has started on the feature. labels Aug 5, 2022
@cortisiko cortisiko merged commit 7db4be0 into main Aug 5, 2022
@cortisiko cortisiko deleted the fix/0xNaN-bug branch August 5, 2022 16:15
@github-actions github-actions bot locked and limited conversation to collaborators Aug 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CS-reported issues reported by CS CS-tracking issues being tracked by / relevant to CS QA Passed A successful QA run through has been done release-5.6.0 PRs for v5.6.0 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants