Skip to content

Commit

Permalink
update test to use global config
Browse files Browse the repository at this point in the history
  • Loading branch information
FedericoAmura committed Feb 15, 2024
1 parent 97087f2 commit ad88760
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export async function main() {
accessToken: JSON.stringify(globalThis.LitCI.CONTROLLER_AUTHSIG),
},
],
pkpPublicKey: `0x${globalThis.LitCI.PKP_INFO.publicKey}`,
pkpPublicKey: `0x${globalThis.LitCI.AUTH_METHOD_PKP_INFO.publicKey}`,
expiration: params.expiration,
resources: params.resources,
chainId: 1,
Expand All @@ -43,7 +43,7 @@ export async function main() {

const sessionSigs = await client.getSessionSigs({
chain: 'ethereum',
// expiration: new Date(Date.now() + 60_000 * 60).toISOString(),
expiration: new Date(Date.now() + 60_000 * 60).toISOString(),
resourceAbilityRequests: resourceAbilities,
sessionKey: sessionKeyPair,
authNeededCallback,
Expand Down Expand Up @@ -101,16 +101,12 @@ export async function main() {
// }

if (!signature) {
return fail(
'Failed to sign data with sessionSigs generated by eth wallet auth method'
);
return fail('Failed to sign data with sessionSigs generated previously');
}

// ==================== Success ====================
return success(
`it should use sessionSigs generated by eth wallet auth method to sign data. Signature is ${signature} and pkpSignRes is ${JSON.stringify(
'pkpSignRes'
)}`
`it should get sessionSigs on demand from client and sign data with it`
);
}
await testThis({ name: path.basename(import.meta.url), fn: main });

0 comments on commit ad88760

Please sign in to comment.