Skip to content

Commit

Permalink
Get rid of old encryptionPrivateKey
Browse files Browse the repository at this point in the history
  • Loading branch information
pkoch committed Dec 17, 2024
1 parent f676751 commit e7a871b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/idos-example-dapp/api/NEAR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const nearGranteeSigner = KeyPair.fromString(NEAR_GRANTEE_PRIVATE_KEY);
const idosGrantee = await idOSGrantee.init({
chainType: "NEAR",
granteeSigner: nearGranteeSigner,
encryptionPrivateKey: ENCRYPTION_SECRET_KEY,
recipientEncryptionPrivateKey: ENCRYPTION_SECRET_KEY,
});

const encryptionPublicKey = idosGrantee.encryptionPublicKey;
Expand All @@ -38,7 +38,7 @@ export default async function (request: VercelRequest, response: VercelResponse)
}

const rawBody = request.read();
let body;
let body: ReturnType<typeof JSON.parse>;
try {
body = JSON.parse(rawBody);
} catch (e) {
Expand Down
4 changes: 2 additions & 2 deletions packages/idos-sdk-server-dapp/src/idOS-grantee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export class idOSGrantee {
}): Promise<idOSGrantee>;

static async init({
recipientEncryptionPrivateKey: encryptionPrivateKey,
recipientEncryptionPrivateKey,
nodeUrl = KwilWrapper.defaults.kwilProvider,
chainId,
dbId,
Expand Down Expand Up @@ -173,7 +173,7 @@ export class idOSGrantee {
}

return new idOSGrantee(
NoncedBox.fromBase64SecretKey(encryptionPrivateKey),
NoncedBox.fromBase64SecretKey(recipientEncryptionPrivateKey),
nodeKwil,
kwilSigner,
dbId,
Expand Down

0 comments on commit e7a871b

Please sign in to comment.