Skip to content

Commit

Permalink
Merge pull request #661 from clrfund/fix/sponsor-buffer-issue
Browse files Browse the repository at this point in the history
Fix undefined buffer error while sponsoring user
  • Loading branch information
yuetloo authored May 27, 2023
2 parents 76d4fb4 + 6330683 commit 2ff5a51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vue-app/src/api/bright-id.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ export async function brightIdSponsor(userAddress: string): Promise<SponsorData>
}

const message = JSON.stringify(op)
const arrayedMessage = Buffer.from(message)
const arrayedMessage = utils.toUtf8Bytes(message)
const arrayedKey = utils.base64.decode(brightIdSponsorKey)
const signature = nacl.sign.detached(arrayedMessage, arrayedKey)
op.sig = utils.base64.encode(signature)
Expand Down

0 comments on commit 2ff5a51

Please sign in to comment.