Skip to content

Conversation

@legobeat
Copy link
Contributor

  • tweetnacl-util is no longer actively maintained
  • @scure/base is already pulled in transitively through ethereum-cryptography
  • Remove redundant base64 encode/decode step when decoding hex input

Related

@legobeat legobeat marked this pull request as ready for review November 22, 2023 07:13
@legobeat legobeat added the dependencies Pull requests that update a dependency file label Nov 22, 2023
@legobeat legobeat force-pushed the deps-remove-tweetnacl-util branch from fb8fce3 to 1b64baf Compare April 22, 2024 08:48
@legobeat legobeat requested a review from a team April 22, 2024 08:50
@legobeat legobeat force-pushed the deps-remove-tweetnacl-util branch from 1b64baf to 8daca4d Compare April 22, 2024 08:59
- `tweetnacl-util` is no longer actively maintained
- `@scure/base` is already pulled in transitively through `ethereum-cryptography`
- Remove redundant base64 encode/decode step when decoding hex input
@legobeat legobeat force-pushed the deps-remove-tweetnacl-util branch from 8daca4d to c34eb6c Compare April 22, 2024 09:28
case 'x25519-xsalsa20-poly1305': {
// string to buffer to UInt8Array
const receiverPrivateKeyUint8Array = naclDecodeHex(privateKey);
const receiverPrivateKeyUint8Array = Buffer.from(privateKey, 'hex');
Copy link
Member

Choose a reason for hiding this comment

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

Can we use @metamask/utils instead of Node.js globals?

Copy link
Contributor Author

@legobeat legobeat May 1, 2024

Choose a reason for hiding this comment

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

Can we address that in a separate PR? The native Buffer.from is already used by this function (from here), so we're not introducing it in this PR.

@legobeat legobeat requested a review from Mrtenz May 1, 2024 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants