metamask-mobile
metamask-mobile copied to clipboard
[FIX] Change deprecated Buffer constructor method for buffer.from
Development & PR Process
- Follow MetaMask Mobile Coding Standards
- Add
release-xxlabel to identify the PR slated for a upcoming release (will be used in release discussion) - Add
needs-dev-reviewlabel when work is completed - Add
needs-qalabel when dev review is completed - Add
QA Passedlabel 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()andnew 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