From 66e3e255d72c7e5514ee9692c808ae4b94aea04d Mon Sep 17 00:00:00 2001 From: Kozer4 Date: Wed, 29 Nov 2023 15:56:47 +0200 Subject: [PATCH] feat: memo 28 char max --- src/utils/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/index.ts b/src/utils/index.ts index c2317c92..9e7b7375 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -9,7 +9,7 @@ export interface Utils { /** * Add memo to solana's transaction * @param transaction transaction to add memo - * @param memo memo to add (32 char max) + * @param memo memo to add (28 char max) */ addMemoToTx(transaction: VersionedTransaction, memo: string): Promise; } @@ -18,8 +18,8 @@ export class DefaultUtils implements Utils { constructor(readonly solanaRpcUrl: string) {} async addMemoToTx(transaction: VersionedTransaction, memo: string): Promise { - if (memo.length > 32) { - throw new SdkError("InvalidArgumentException memo cannot be more than 32 characters"); + if (memo.length > 28) { + throw new SdkError("InvalidArgumentException memo cannot be more than 28 characters"); } const connection = new Connection(this.solanaRpcUrl, "confirmed"); const addressLookupTableAccounts = await fetchAddressLookupTableAccountsFromTx(transaction, connection);