Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
codabrink committed Nov 26, 2024
1 parent 35ea1f6 commit c2123dc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/frames-validator/src/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export async function validateFramesPost(
actionBodyBytes,
signature,
signedPublicKeyBundle,
installationId, // not necessary
installationId,
installationSignature,
inboxId,
} = deserializeProtoMessage(messageBytes);
Expand All @@ -48,7 +48,7 @@ export async function validateFramesPost(
}
} else {
// make sure inbox IDs match
const authorized = Client.isAddressAuthorized(inboxId, walletAddress);
const authorized = Client.isInstallationAuthorized(inboxId, installationId);
if (!authorized) {
throw new Error("Invalid inbox ID");
}
Expand Down
7 changes: 7 additions & 0 deletions sdks/node-sdk/src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,13 @@ export class Client {
return this.#innerClient.isAddressAuthorized(inboxId, address);
}

async isInstallationAuthorized(
inboxId: string,
installationId: Uint8Array,
): Promise<boolean> {
return this.#innerClient.isInstallationAuthorized(inboxId, installationId);
}

async #createInboxSignatureText() {
try {
const signatureText = await this.#innerClient.createInboxSignatureText();
Expand Down

0 comments on commit c2123dc

Please sign in to comment.