Skip to content

Commit

Permalink
fix: buffer param
Browse files Browse the repository at this point in the history
  • Loading branch information
00xSam committed Oct 9, 2024
1 parent 9ad77c2 commit 80cd87f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ts-client/src/vault/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ export const getAssociatedTokenAccount = (tokenMint: PublicKey, owner: PublicKey
return getAssociatedTokenAddressSync(tokenMint, owner, true, TOKEN_PROGRAM_ID, ASSOCIATED_TOKEN_PROGRAM_ID);
};

export const deserializeAccount = (data: Uint8Array | undefined): RawAccount | undefined => {
export const deserializeAccount = (data: Buffer | undefined): RawAccount | undefined => {
if (data == undefined || data.length == 0) {
return undefined;
}
const accountInfo = AccountLayout.decode(data);
return accountInfo;
};

export const deserializeMint = (data: Uint8Array | undefined): RawMint | undefined => {
export const deserializeMint = (data: Buffer | undefined): RawMint | undefined => {
if (data == undefined || data.length == 0) {
return undefined;
}
Expand Down

0 comments on commit 80cd87f

Please sign in to comment.