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

Bug: Creating Snap account due to new scopes field on Keyring Account is not possible #170

Open
voidash opened this issue Jan 27, 2025 · 1 comment

Comments

@voidash
Copy link

voidash commented Jan 27, 2025

The latest release introduces scopes field in KeyringAccount as described on release v0.5.0 description. However due to this change emitSnapKeyringEvent fails. The following line is what exactly fails on keyring.ts

await this.#emitEvent(KeyringEvent.AccountCreated, { account });

The error thrown is

{   "code": -32603,   "message": "At path: params.account.scopes -- Expected a value of type `never`, but received: `eip155:31337`",   
"stack": "Error: At path: params.account.scopes -- Expected a value of type `never`, but received: `eip155:31337`\n  at Ne (eval at <anonymous> (eval at makeEvaluate (chrome-extension://ljfoeinjpaedjfecbmggjgodbgkmjkjk/snaps/index.html:6368:27)), <anonymous>:1:58257)\n  at async l.executeInSnapContext (chrome-extension://ljfoeinjpaedjfecbmggjgodbgkmjkjk/snaps/bundle.js:9:51165)\n  at async chrome-extension://ljfoeinjpaedjfecbmggjgodbgkmjkjk/snaps/bundle.js:9:46655\n  at async Object.snapRpc (chrome-extension://ljfoeinjpaedjfecbmggjgodbgkmjkjk/snaps/bundle.js:9:51886)\n  at async l.onCommandRequest (chrome-extension://ljfoeinjpaedjfecbmggjgodbgkmjkjk/snaps/bundle.js:9:47986)" }
@roo-shy
Copy link

roo-shy commented Jan 29, 2025

Referencing MetaMask/snaps#3041

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants