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

feat(keyring-controller): allow non-evm addresses for non-evm methods/functions #4282

Merged
merged 10 commits into from
May 20, 2024

Conversation

ccharly
Copy link
Contributor

@ccharly ccharly commented May 16, 2024

Explanation

This allows support of non-EVM addresses for most keyring methods.

Right now, our addresses are just plain string, meaning we have not easy way to detect if an address is an ethereum one or not. So we use runtime check to verify this, and based on this we adapt some logic (mostly the address normalization right now).

Also, some Hex were being dropped in favor of string type to make addresses a bit more "generic".

References

Changelog

@metamask/keyring-controller

  • ADDED: Basic support for non-EVM addresses

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate

@ccharly ccharly force-pushed the feature/keyring-controller-non-evm-support branch from f37dd57 to 54272e4 Compare May 16, 2024 10:48
@ccharly ccharly force-pushed the feature/keyring-controller-non-evm-support branch from 54272e4 to 18174fa Compare May 16, 2024 12:59
@ccharly
Copy link
Contributor Author

ccharly commented May 16, 2024

@metamaskbot publish-preview

Copy link
Contributor

Preview builds have been published. See these instructions for more information about preview builds.

Expand for full list of packages and versions.
{
  "@metamask-previews/accounts-controller": "14.0.0-preview-eb2b1875",
  "@metamask-previews/address-book-controller": "4.0.1-preview-eb2b1875",
  "@metamask-previews/announcement-controller": "6.1.0-preview-eb2b1875",
  "@metamask-previews/approval-controller": "6.0.2-preview-eb2b1875",
  "@metamask-previews/assets-controllers": "29.0.0-preview-eb2b1875",
  "@metamask-previews/base-controller": "5.0.2-preview-eb2b1875",
  "@metamask-previews/build-utils": "2.0.1-preview-eb2b1875",
  "@metamask-previews/composable-controller": "6.0.1-preview-eb2b1875",
  "@metamask-previews/controller-utils": "9.1.0-preview-eb2b1875",
  "@metamask-previews/ens-controller": "10.0.1-preview-eb2b1875",
  "@metamask-previews/eth-json-rpc-provider": "3.0.2-preview-eb2b1875",
  "@metamask-previews/gas-fee-controller": "15.1.2-preview-eb2b1875",
  "@metamask-previews/json-rpc-engine": "8.0.2-preview-eb2b1875",
  "@metamask-previews/json-rpc-middleware-stream": "7.0.1-preview-eb2b1875",
  "@metamask-previews/keyring-controller": "16.0.0-preview-eb2b1875",
  "@metamask-previews/logging-controller": "3.0.1-preview-eb2b1875",
  "@metamask-previews/message-manager": "8.0.2-preview-eb2b1875",
  "@metamask-previews/name-controller": "6.0.1-preview-eb2b1875",
  "@metamask-previews/network-controller": "18.1.0-preview-eb2b1875",
  "@metamask-previews/notification-controller": "5.0.1-preview-eb2b1875",
  "@metamask-previews/permission-controller": "9.0.2-preview-eb2b1875",
  "@metamask-previews/permission-log-controller": "2.0.1-preview-eb2b1875",
  "@metamask-previews/phishing-controller": "9.0.2-preview-eb2b1875",
  "@metamask-previews/polling-controller": "6.0.2-preview-eb2b1875",
  "@metamask-previews/preferences-controller": "11.0.0-preview-eb2b1875",
  "@metamask-previews/profile-sync-controller": "0.0.0-preview-eb2b1875",
  "@metamask-previews/queued-request-controller": "0.10.0-preview-eb2b1875",
  "@metamask-previews/rate-limit-controller": "5.0.1-preview-eb2b1875",
  "@metamask-previews/selected-network-controller": "13.0.0-preview-eb2b1875",
  "@metamask-previews/signature-controller": "16.0.0-preview-eb2b1875",
  "@metamask-previews/transaction-controller": "29.0.0-preview-eb2b1875",
  "@metamask-previews/user-operation-controller": "10.0.0-preview-eb2b1875"
}

@ccharly ccharly marked this pull request as ready for review May 16, 2024 14:02
@ccharly ccharly requested a review from a team as a code owner May 16, 2024 14:02
@ccharly ccharly merged commit 3be5fcc into main May 20, 2024
147 checks passed
@ccharly ccharly deleted the feature/keyring-controller-non-evm-support branch May 20, 2024 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants