Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit d72289c

Browse files
authored
Refactor Function Declaration (#6283)
* Refactor Function Declaration * Fix lint error
1 parent 6a8d23c commit d72289c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

token-metadata/js/src/state.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ function isNonePubkey(buffer: Uint8Array): boolean {
3939
}
4040

4141
// Pack TokenMetadata into byte slab
42-
export const pack = (meta: TokenMetadata): Uint8Array => {
42+
export function pack(meta: TokenMetadata): Uint8Array {
4343
// If no updateAuthority given, set it to the None/Zero PublicKey for encoding
4444
const updateAuthority = meta.updateAuthority ?? PublicKey.default;
4545
return tokenMetadataCodec.encode({
4646
...meta,
4747
updateAuthority: updateAuthority.toBuffer(),
4848
mint: meta.mint.toBuffer(),
4949
});
50-
};
50+
}
5151

5252
// unpack byte slab into TokenMetadata
5353
export function unpack(buffer: Buffer | Uint8Array): TokenMetadata {

0 commit comments

Comments
 (0)