Skip to content

Commit

Permalink
fix(issuer-sdk-js): safeguard granteeAddress when sharing credential (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammed-Mamoun98 authored Dec 19, 2024
1 parent cbf6903 commit 0737cc5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/issuer-sdk-js/src/credentials.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ export async function shareCredentialByGrant(
if (payload.public_notes !== "")
throw new Error("shared credentials cannot have public_notes, it must be an empty string");

if (!params.granteeAddress) throw new Error("`granteeAddress` is required");

await kwilClient.execute(
{
name: "share_credential_by_write_grant",
Expand Down

0 comments on commit 0737cc5

Please sign in to comment.