Skip to content

Commit

Permalink
some fixes to make the manual tests work with node changes (#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
glitch003 authored Oct 5, 2023
1 parent 0a31483 commit 7bc1046
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions apps/html/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- (DO NOT EDIT!) (HTML) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-html.mjs Tue, 03 Oct 2023 19:34:00 GMT -->
<!-- (DO NOT EDIT!) (HTML) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-html.mjs Wed, 04 Oct 2023 23:44:06 GMT -->
<!DOCTYPE html>
<html lang="en">
<head>
Expand Down Expand Up @@ -62,7 +62,7 @@
</style>
</head>
<body>
(HTML) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-html.mjs Tue, 03 Oct 2023 19:34:00 GMT
(HTML) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-html.mjs Wed, 04 Oct 2023 23:44:06 GMT

<!-- ==================== ALL EXPORTED VANILLA LIBRARIES ==================== -->
<script src="dist/packages/access-control-conditions-vanilla/access-control-conditions.js"></script>
Expand Down
9 changes: 6 additions & 3 deletions apps/html/manual_tests_claim_pkp.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
var testSigningWithPkpSign = async () => {
console.log('testing sig with pkpSign...');
let sig = await litNodeClient.pkpSign({
toSign: [104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100], // hello world in Uint8Array
toSign: [84, 104, 105, 115, 32, 109, 101, 115, 115, 97, 103, 101, 32, 105, 115, 32, 101, 120, 97, 99, 116, 108, 121, 32, 51, 50, 32, 98, 121, 116, 101, 115], // "This message is exactly 32 bytes" in Uint8Array
pubKey: claimResp.pubkey,
authMethods: [authMethod],
authSig,
Expand Down Expand Up @@ -104,8 +104,8 @@
authSig,
// all jsParams can be used anywhere in your litActionCode
jsParams: {
// this is the string "Hello World" for testing
toSign: [72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100],
// this is the string "This message is exactly 32 bytes" for testing
toSign: [84, 104, 105, 115, 32, 109, 101, 115, 115, 97, 103, 101, 32, 105, 115, 32, 101, 120, 97, 99, 116, 108, 121, 32, 51, 50, 32, 98, 121, 116, 101, 115],
publicKey: "0x" + claimResp.pubkey,
sigName: "sig1",
},
Expand Down Expand Up @@ -211,6 +211,9 @@

// document.getElementById('status').innerText = `All passed: ${allPassed}`;

console.log('sleeping 20s for node to sync...');
await new Promise((resolve) => setTimeout(resolve, 20000));

let allPassed = true
let result = await testSigningWithPkpSign();
console.log(`test passed: `, result);
Expand Down
2 changes: 1 addition & 1 deletion apps/react/src/app/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1802,7 +1802,7 @@ pre {
`,
}}
/>
(REACT) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-react.mjs Tue, 03 Oct 2023 19:34:00 GMT
(REACT) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-react.mjs Wed, 04 Oct 2023 23:44:07 GMT
<div id="root"></div>
<pre><code id="result"></code></pre>
</>
Expand Down

0 comments on commit 7bc1046

Please sign in to comment.