File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
routes/(new-styling)/callback Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import { fromBase64URL, toBase64URL } from "$lib/utils/utils";
77import { Principal } from "@icp-sdk/core/principal" ;
88import { isNullish , nonNullish } from "@dfinity/utils" ;
99import {
10- PopupClosedError ,
10+ CallbackPopupClosedError ,
1111 REDIRECT_CALLBACK_PATH ,
1212 redirectInPopup ,
1313} from "../../routes/(new-styling)/callback/utils" ;
@@ -90,7 +90,7 @@ export const isNotSupportedError = (error: unknown) =>
9090export const isOpenIdCancelError = ( error : unknown ) => {
9191 return (
9292 ( error instanceof Error && error . name === "NetworkError" ) ||
93- error instanceof PopupClosedError
93+ error instanceof CallbackPopupClosedError
9494 ) ;
9595} ;
9696
Original file line number Diff line number Diff line change 11const BROADCAST_CHANNEL = "redirect_callback" ;
22export const REDIRECT_CALLBACK_PATH = "/callback" ;
33
4- export class PopupClosedError extends Error { }
4+ export class CallbackPopupClosedError extends Error { }
55
66export const redirectInPopup = ( url : string ) : Promise < string > => {
77 const width = 500 ;
@@ -22,7 +22,7 @@ export const redirectInPopup = (url: string): Promise<string> => {
2222 const closeInterval = setInterval ( ( ) => {
2323 if ( redirectWindow ?. closed === true ) {
2424 clearInterval ( closeInterval ) ;
25- reject ( new PopupClosedError ( ) ) ;
25+ reject ( new CallbackPopupClosedError ( ) ) ;
2626 }
2727 } , 500 ) ;
2828 // Listen to the popup, we expect a message with the url of the callback,
You can’t perform that action at this time.
0 commit comments