metamask-mobile icon indicating copy to clipboard operation
metamask-mobile copied to clipboard

[FIX] Change deprecated Buffer constructor method for buffer.from

Open gantunesr opened this issue 3 years ago • 0 comments

Development & PR Process

  1. Follow MetaMask Mobile Coding Standards
  2. Add release-xx label to identify the PR slated for a upcoming release (will be used in release discussion)
  3. Add needs-dev-review label when work is completed
  4. Add needs-qa label when dev review is completed
  5. Add QA Passed label when QA has signed off

Description

Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions, 1. What is the reason for the change?

The Buffer() and new Buffer() constructors are not recommended for use due to security and usability concerns.

2. What is the improvement/solution?

The app should use the new Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() construction methods instead.

For more information refer to Porting to the Buffer.from()/Buffer.alloc() API

Screenshots/Recordings

Not applicable.

Issue

Progresses #???

Checklist

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

gantunesr avatar Sep 14 '22 17:09 gantunesr