Skip to content

Commit 2c1afc4

Browse files
committed
fmt
1 parent 9dffe40 commit 2c1afc4

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

local-tests/tests/testPkpSessionSigsDomain.ts

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ import { TinnyEnvironment } from 'local-tests/setup/tinny-environment';
88
* ✅ NETWORK=datil-test yarn test:local --filter=testPkpSessionSigsDomain
99
* ✅ NETWORK=custom yarn test:local --filter=testPkpSessionSigsDomain
1010
*/
11-
export const testPkpSessionSigsDomain = async (
12-
devEnv: TinnyEnvironment
13-
) => {
11+
export const testPkpSessionSigsDomain = async (devEnv: TinnyEnvironment) => {
1412
const alice = await devEnv.createRandomPerson();
1513
const testDomain = 'test.domain.com';
1614

@@ -32,22 +30,30 @@ export const testPkpSessionSigsDomain = async (
3230
// { resource: [LitActionResource], ability: 'lit-action-execution' }
3331
// ]
3432
// }
35-
const pkpSessionSigs = await getPkpSessionSigs(devEnv, alice, undefined, undefined, testDomain);
33+
const pkpSessionSigs = await getPkpSessionSigs(
34+
devEnv,
35+
alice,
36+
undefined,
37+
undefined,
38+
testDomain
39+
);
3640

3741
// Get the first session sig to verify
3842
const firstNodeAddress = Object.keys(pkpSessionSigs)[0];
3943
const firstSessionSig = pkpSessionSigs[firstNodeAddress];
4044

4145
// Parse the signed message to verify domain
4246
const signedMessage = firstSessionSig.signedMessage;
43-
47+
4448
// Verify that the domain is present in the signed message
4549
if (!signedMessage.includes(testDomain)) {
46-
throw new Error(`Expected domain "${testDomain}" in signed message, but it was not found. Signed message: ${signedMessage}`);
50+
throw new Error(
51+
`Expected domain "${testDomain}" in signed message, but it was not found. Signed message: ${signedMessage}`
52+
);
4753
}
4854

4955
log('✅ Domain parameter successfully passed through in sessionSigs');
50-
56+
5157
// Clean up
5258
devEnv.releasePrivateKeyFromUser(alice);
53-
};
59+
};

0 commit comments

Comments
 (0)