diff --git a/demos/test-app/src/index.tsx b/demos/test-app/src/index.tsx index e896c3d810..6090ca5430 100644 --- a/demos/test-app/src/index.tsx +++ b/demos/test-app/src/index.tsx @@ -397,6 +397,7 @@ let latestOpts: | undefined | { issuerOrigin: string; + issuerCanisterId: string; derivationOrigin?: string; credTy: CredType; flowId: number; @@ -443,6 +444,7 @@ function handleFlowReady(evnt: MessageEvent) { params: { issuer: { origin: opts.issuerOrigin, + canisterId: opts.issuerCanisterId, }, credentialSpec: credentialSpecs[opts.credTy], credentialSubject: principal, @@ -450,7 +452,7 @@ function handleFlowReady(evnt: MessageEvent) { }, }; - // register a handler for the "done" message, kick start the flow and then + // register a handler for the "done" message, kickstart the flow and then // unregister ourselves try { window.addEventListener("message", handleFlowFinished); @@ -497,6 +499,8 @@ const App = () => { "http://issuer.localhost:5173" ); + const [issuerCanisterId, setIssuerCanisterId] = useState(""); + // Alternative origin for the RP, if any const [derivationOrigin, setDerivationOrigin] = useState(""); @@ -527,7 +531,8 @@ const App = () => { latestOpts = { flowId, credTy, - issuerOrigin: issuerUrl, + issuerOrigin: new URL(issuerUrl).origin, + issuerCanisterId, derivationOrigin: derivationOrigin !== "" ? derivationOrigin : undefined, win: iiWindow, }; @@ -547,6 +552,15 @@ const App = () => { onChange={(evt) => setIssuerUrl(evt.target.value)} /> +