Skip to content

Commit 2d1fb78

Browse files
committed
fix: use the app identity keys to encrypt and prove
1 parent 42d9a3b commit 2d1fb78

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

apps/connect/src/routes/authenticate.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,19 +405,25 @@ function AuthenticateComponent() {
405405
rpcUrl: import.meta.env.VITE_HYPERGRAPH_RPC_URL,
406406
});
407407

408+
const appIdentityKeys = {
409+
encryptionPrivateKey: newAppIdentity.encryptionPrivateKey,
410+
encryptionPublicKey: newAppIdentity.encryptionPublicKey,
411+
signaturePrivateKey: newAppIdentity.signaturePrivateKey,
412+
signaturePublicKey: newAppIdentity.signaturePublicKey,
413+
};
408414
console.log('encrypting app identity');
409415
const { ciphertext, nonce } = await Connect.encryptAppIdentity(
410416
signer,
411417
newAppIdentity.address,
412418
newAppIdentity.addressPrivateKey,
413419
permissionId,
414-
keys,
420+
appIdentityKeys,
415421
);
416422
console.log('proving ownership');
417423
const { accountProof, keyProof } = await Identity.proveIdentityOwnership(
418424
smartAccountClient,
419425
accountAddress,
420-
keys,
426+
appIdentityKeys,
421427
);
422428

423429
const message: Messages.RequestConnectCreateAppIdentity = {

0 commit comments

Comments
 (0)