@@ -21,58 +21,58 @@ import "./main.css";
2121const signInBtn = document . getElementById ( "signinBtn" ) as HTMLButtonElement ;
2222const whoamiBtn = document . getElementById ( "whoamiBtn" ) as HTMLButtonElement ;
2323const updateAlternativeOriginsBtn = document . getElementById (
24- "updateNewAlternativeOrigins"
24+ "updateNewAlternativeOrigins" ,
2525) as HTMLButtonElement ;
2626const openIiWindowBtn = document . getElementById (
27- "openIiWindowBtn"
27+ "openIiWindowBtn" ,
2828) as HTMLButtonElement ;
2929const closeIiWindowBtn = document . getElementById (
30- "closeIIWindowBtn"
30+ "closeIIWindowBtn" ,
3131) as HTMLButtonElement ;
3232const invalidDataBtn = document . getElementById (
33- "invalidDataBtn"
33+ "invalidDataBtn" ,
3434) as HTMLButtonElement ;
3535const incompleteMessageBtn = document . getElementById (
36- "incompleteMessageBtn"
36+ "incompleteMessageBtn" ,
3737) as HTMLButtonElement ;
3838const validMessageBtn = document . getElementById (
39- "validMessageBtn"
39+ "validMessageBtn" ,
4040) as HTMLButtonElement ;
4141const customMessageEl = document . getElementById (
42- "customMessage"
42+ "customMessage" ,
4343) as HTMLInputElement ;
4444const customMessageBtn = document . getElementById (
45- "customMessageBtn"
45+ "customMessageBtn" ,
4646) as HTMLButtonElement ;
4747const messagesEl = document . getElementById ( "messages" ) as HTMLElement ;
4848const hostUrlEl = document . getElementById ( "hostUrl" ) as HTMLInputElement ;
4949const whoAmIResponseEl = document . getElementById (
50- "whoamiResponse"
50+ "whoamiResponse" ,
5151) as HTMLDivElement ;
5252const alternativeOriginsEl = document . getElementById (
53- "alternativeOrigins"
53+ "alternativeOrigins" ,
5454) as HTMLDivElement ;
5555const newAlternativeOriginsEl = document . getElementById (
56- "newAlternativeOrigins"
56+ "newAlternativeOrigins" ,
5757) as HTMLInputElement ;
5858const principalEl = document . getElementById ( "principal" ) as HTMLDivElement ;
5959const authnMethodEl = document . querySelector (
60- '[data-role="authn-method"]'
60+ '[data-role="authn-method"]' ,
6161) as HTMLDivElement ;
6262const delegationEl = document . getElementById ( "delegation" ) as HTMLPreElement ;
6363const expirationEl = document . getElementById ( "expiration" ) as HTMLDivElement ;
6464const iiUrlEl = document . getElementById ( "iiUrl" ) as HTMLInputElement ;
6565const maxTimeToLiveEl = document . getElementById (
66- "maxTimeToLive"
66+ "maxTimeToLive" ,
6767) as HTMLInputElement ;
6868const derivationOriginEl = document . getElementById (
69- "derivationOrigin"
69+ "derivationOrigin" ,
7070) as HTMLInputElement ;
7171const autoSelectionPrincipalEl = document . getElementById (
72- "autoSelectionPrincipal"
72+ "autoSelectionPrincipal" ,
7373) as HTMLInputElement ;
7474const allowPinAuthenticationEl = document . getElementById (
75- "allowPinAuthentication"
75+ "allowPinAuthentication" ,
7676) as HTMLInputElement ;
7777
7878let iiProtocolTestWindow : Window | undefined ;
@@ -112,7 +112,7 @@ const idlFactory = ({ IDL }: { IDL: any }) => {
112112 update_alternative_origins : IDL . Func (
113113 [ IDL . Text , AlternativeOriginsMode ] ,
114114 [ ] ,
115- [ ]
115+ [ ] ,
116116 ) ,
117117 whoami : IDL . Func ( [ ] , [ IDL . Principal ] , [ "query" ] ) ,
118118 } ) ;
@@ -135,7 +135,7 @@ const updateDelegationView = ({
135135 delegationEl . innerText = JSON . stringify (
136136 identity . getDelegation ( ) . toJSON ( ) ,
137137 undefined ,
138- 2
138+ 2 ,
139139 ) ;
140140
141141 // cannot use Math.min, as we deal with bigint here
@@ -171,7 +171,7 @@ function addMessageElement({
171171 messageTitle . classList . add ( "postMessage-title" ) ;
172172 const messageContent = document . createElement ( "div" ) ;
173173 messageContent . innerText = JSON . stringify ( message , ( _ , v ) =>
174- typeof v === "bigint" ? v . toString ( ) : v
174+ typeof v === "bigint" ? v . toString ( ) : v ,
175175 ) ;
176176 if ( ty === "received" ) {
177177 messageTitle . innerText = "Message Received" ;
@@ -199,12 +199,12 @@ window.addEventListener("message", (event) => {
199199 const delegations = event . data . delegations . map ( extractDelegation ) ;
200200 const delegationChain = DelegationChain . fromDelegations (
201201 delegations ,
202- event . data . userPublicKey . buffer
202+ event . data . userPublicKey . buffer ,
203203 ) ;
204204 updateDelegationView ( {
205205 identity : DelegationIdentity . fromDelegation (
206206 getLocalIdentity ( ) ,
207- delegationChain
207+ delegationChain ,
208208 ) ,
209209 } ) ;
210210} ) ;
@@ -301,7 +301,7 @@ const init = async () => {
301301 const validMessage = {
302302 kind : "authorize-client" ,
303303 sessionPublicKey : new Uint8Array (
304- getLocalIdentity ( ) . getPublicKey ( ) . toDer ( )
304+ getLocalIdentity ( ) . getPublicKey ( ) . toDer ( ) ,
305305 ) ,
306306 derivationOrigin,
307307 maxTimeToLive,
@@ -330,7 +330,7 @@ const init = async () => {
330330 } ) ;
331331 const modeSelection = (
332332 document . querySelector (
333- 'input[name="alternativeOriginsMode"]:checked'
333+ 'input[name="alternativeOriginsMode"]:checked' ,
334334 ) as HTMLInputElement
335335 ) . value ;
336336 let mode :
@@ -430,7 +430,7 @@ function handleFlowReady(evnt: MessageEvent) {
430430
431431 if ( opts === undefined ) {
432432 return showError (
433- "Unexpected: received OK from IDP but this test app is not ready"
433+ "Unexpected: received OK from IDP but this test app is not ready" ,
434434 ) ;
435435 }
436436
@@ -491,7 +491,7 @@ function handleFlowFinished(evnt: MessageEvent) {
491491 const ver = decodeJwt ( verifiablePresentation ) as any ;
492492 const creds = ver . vp . verifiableCredential ;
493493 const [ alias , credential ] = creds . map ( ( cred : string ) =>
494- JSON . stringify ( decodeJwt ( cred ) , null , 2 )
494+ JSON . stringify ( decodeJwt ( cred ) , null , 2 ) ,
495495 ) ;
496496
497497 setLatestPresentation ( { alias, credential } ) ;
@@ -504,7 +504,7 @@ function handleFlowFinished(evnt: MessageEvent) {
504504const App = ( ) => {
505505 // The URL used for connecting to the issuer
506506 const [ issuerUrl , setIssuerUrl ] = useState < string > (
507- "http://issuer.localhost:5173"
507+ "http://issuer.localhost:5173" ,
508508 ) ;
509509
510510 const [ issuerCanisterId , setIssuerCanisterId ] = useState < string > ( "" ) ;
@@ -607,5 +607,5 @@ const App = () => {
607607ReactDOM . createRoot ( document . getElementById ( "root-vc-flow" ) ! ) . render (
608608 < React . StrictMode >
609609 < App />
610- </ React . StrictMode >
610+ </ React . StrictMode > ,
611611) ;
0 commit comments