Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

Commit

Permalink
pass snapId
Browse files Browse the repository at this point in the history
  • Loading branch information
owencraston committed Oct 5, 2023
1 parent 1932bdc commit a740578
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/SnapKeyring.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,12 @@ export type SnapKeyringCallbacks = {
snapId: string,
handleUserInput: (accepted: boolean) => Promise<void>,
): Promise<void>;
redirectUser(message: string, url: string, method: string): Promise<void>;
redirectUser(
snapId: string,
url: string,
message: string,
method: string,
): Promise<void>;
};

/**
Expand Down Expand Up @@ -450,7 +455,7 @@ export class SnapKeyring extends EventEmitter {
if (response.redirect?.message || response.redirect?.url) {
const { message, url } = response.redirect;
if (message && url) {
await this.#callbacks.redirectUser(message, url, method);
await this.#callbacks.redirectUser(snapId, url, message, method);
} else {
console.warn(
`Snap '${snapId}' requested a redirect but the message or URL is missing.`,
Expand Down

0 comments on commit a740578

Please sign in to comment.