diff --git a/src/components/home/wallet/connect-cli.tsx b/src/components/home/wallet/connect-cli.tsx index 63f7a239..4f32b342 100644 --- a/src/components/home/wallet/connect-cli.tsx +++ b/src/components/home/wallet/connect-cli.tsx @@ -130,7 +130,7 @@ function Content({ wallet, isConnecting, connect, error, form, onSwitch, rootRef const [signMessage, setSignMessage] = useState(); const [isLoading, setIsLoading] = useState(false); - const requiresKey = [Blockchain.CARDANO, Blockchain.ARWEAVE].includes(blockchain); + const requiresKey = [Blockchain.CARDANO, Blockchain.ARWEAVE, Blockchain.INTERNET_COMPUTER].includes(blockchain); const hasKey = !requiresKey || key; useEffect(() => { diff --git a/src/contexts/app-handling.context.tsx b/src/contexts/app-handling.context.tsx index 65d7cffe..68b70417 100644 --- a/src/contexts/app-handling.context.tsx +++ b/src/contexts/app-handling.context.tsx @@ -18,6 +18,7 @@ const urlParamsToRemove = [ 'lang', 'address', 'signature', + 'key', 'mail', 'account-type', 'first-name', @@ -67,6 +68,7 @@ export interface AppParams { lang?: string; address?: string; signature?: string; + key?: string; mail?: string; accountType?: string; firstName?: string; @@ -244,6 +246,7 @@ export function AppHandlingContextProvider(props: AppHandlingContextProps): JSX. delete copy.address; delete copy.signature; + delete copy.key; delete copy.session; delete copy.autoStart; @@ -308,6 +311,7 @@ export function AppHandlingContextProvider(props: AppHandlingContextProps): JSX. lang: getParameter(query, 'lang'), address: getParameter(query, 'address'), signature: getParameter(query, 'signature'), + key: getParameter(query, 'key'), mail: getParameter(query, 'mail'), accountType: getParameter(query, 'account-type'), firstName: getParameter(query, 'first-name'), diff --git a/src/contexts/wallet.context.tsx b/src/contexts/wallet.context.tsx index ab2fc350..1558b8e0 100644 --- a/src/contexts/wallet.context.tsx +++ b/src/contexts/wallet.context.tsx @@ -225,7 +225,7 @@ export function WalletContextProvider(props: WalletContextProps): JSX.Element { // Set credentials BEFORE async call to prevent race conditions (React StrictMode double-render) lastAppliedCredentials.current = { address: appParams.address, signature: appParams.signature }; - await createSession(appParams.address, appParams.signature); + await createSession(appParams.address, appParams.signature, appParams.key); return true; } else if (appParams.session && Utils.isJwt(appParams.session)) { // Skip if same session was already applied diff --git a/src/index-widget.tsx b/src/index-widget.tsx index 9df5cea0..5e3795d8 100644 --- a/src/index-widget.tsx +++ b/src/index-widget.tsx @@ -11,6 +11,7 @@ const props: { [k in keyof WidgetParams]: 'string' | 'number' | 'boolean' | 'fun lang: 'string', address: 'string', signature: 'string', + key: 'string', mail: 'string', accountType: 'string', firstName: 'string',