Skip to content

Commit

Permalink
chore: switch #validateRedirectUrl back to a sync method
Browse files Browse the repository at this point in the history
  • Loading branch information
danroc committed Sep 30, 2024
1 parent 6f9a4a8 commit 54eb2a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/keyring-snap-bridge/src/SnapKeyring.ts
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ export class SnapKeyring extends EventEmitter {
): Promise<void> {
const { message = '', url = '' } = redirect;
if (url) {
await this.#validateRedirectUrl(url, snapId);
this.#validateRedirectUrl(url, snapId);
}
await this.#callbacks.redirectUser(snapId, url, message);
}
Expand All @@ -589,7 +589,7 @@ export class SnapKeyring extends EventEmitter {
* @param snapId - The Snap ID to check allowed origins for.
* @throws An error if the URL's origin is not in the Snap's allowed origins.
*/
async #validateRedirectUrl(url: string, snapId: SnapId): Promise<void> {
#validateRedirectUrl(url: string, snapId: SnapId): void {
const { origin } = new URL(url);
const snap = this.#snapClient.getController().get(snapId);
if (!snap) {
Expand Down

0 comments on commit 54eb2a9

Please sign in to comment.