Skip to content

refactor(snaps-rpc-methods)!: Use messenger for permitted methods#3987

Draft
FrederikBolding wants to merge 11 commits intofb/restricted-methods-messengerfrom
fb/refactor-permitted-methods
Draft

refactor(snaps-rpc-methods)!: Use messenger for permitted methods#3987
FrederikBolding wants to merge 11 commits intofb/restricted-methods-messengerfrom
fb/refactor-permitted-methods

Conversation

@FrederikBolding
Copy link
Copy Markdown
Member

@FrederikBolding FrederikBolding commented May 6, 2026

Migrate the permitted method handlers to use the messenger where applicable.

https://consensyssoftware.atlassian.net/browse/WPC-995

/**
* @returns All installed Snaps.
*/
getAllSnaps: () => Promise<GetSnapsResult>;
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Turns out the types here have always been wrong

* file does not exist.
*/
export type GetFileResult = string;
export type GetFileResult = string | null;
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This has always been possible, but the type was wrong.

@FrederikBolding FrederikBolding changed the base branch from main to fb/restricted-methods-messenger May 6, 2026 14:51
@FrederikBolding FrederikBolding force-pushed the fb/refactor-permitted-methods branch from 41732f0 to 84d1229 Compare May 6, 2026 14:53
@FrederikBolding FrederikBolding changed the title refactor(snaps-rpc-methods): Use messenger for permitted methods refactor(snaps-rpc-methods)!: Use messenger for permitted methods May 7, 2026
import { updateInterfaceHandler } from './updateInterface';

/* eslint-disable @typescript-eslint/naming-convention */
const methodHandlers = {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

TypeScript failed to generate declarations for this, but we don't actually need to export it, so I moved it here and stopped exporting.

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

Successfully merging this pull request may close these issues.

1 participant