Skip to content

Commit

Permalink
use bare byte string for handle parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
mnaamani committed Oct 30, 2023
1 parent dafec1f commit 84595d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/joyApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export class JoyApi {
}

async handleIsAlreadyRegistered(handle: string): Promise<boolean> {
const handleHash = blake2AsHex(handle)
const handleHash = blake2AsHex(Buffer.from(handle))
const storageSize = await this.api.query.members.memberIdByHandleHash.size(
handleHash
)
Expand All @@ -142,7 +142,7 @@ export class JoyApi {
return this.api.tx.members.giftMembership({
rootAccount: account,
controllerAccount: account,
handle: handle,
handle: '0x' + Buffer.from(handle).toString('hex'),
metadata: createType(
'Bytes',
'0x' +
Expand Down

0 comments on commit 84595d8

Please sign in to comment.