From 86ba346ec6ea3e27abf9fc3b267fbe224533d776 Mon Sep 17 00:00:00 2001 From: shan-57blocks <115970472+shan-57blocks@users.noreply.github.com> Date: Mon, 25 Nov 2024 14:30:55 +0800 Subject: [PATCH] solana allow owner off curve (#372) Co-authored-by: shan --- .../huma-shared/src/solana/utils/tokenAccountHelperUtils.ts | 6 +++--- .../huma-web-shared/src/solana/hooks/useSolanaAccounts.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/huma-shared/src/solana/utils/tokenAccountHelperUtils.ts b/packages/huma-shared/src/solana/utils/tokenAccountHelperUtils.ts index 1aed62d..5fbfc62 100644 --- a/packages/huma-shared/src/solana/utils/tokenAccountHelperUtils.ts +++ b/packages/huma-shared/src/solana/utils/tokenAccountHelperUtils.ts @@ -20,19 +20,19 @@ export const getTokenAccounts = ( const underlyingTokenATA = getAssociatedTokenAddressSync( new PublicKey(poolInfo.underlyingMint.address), account, - false, // allowOwnerOffCurve + true, // allowOwnerOffCurve TOKEN_PROGRAM_ID, ) const juniorTrancheATA = getAssociatedTokenAddressSync( new PublicKey(poolInfo.juniorTrancheMint), account, - false, + true, TOKEN_2022_PROGRAM_ID, ) const seniorTrancheATA = getAssociatedTokenAddressSync( new PublicKey(poolInfo.seniorTrancheMint), account, - false, + true, TOKEN_2022_PROGRAM_ID, ) const poolJuniorTrancheATA = getAssociatedTokenAddressSync( diff --git a/packages/huma-web-shared/src/solana/hooks/useSolanaAccounts.ts b/packages/huma-web-shared/src/solana/hooks/useSolanaAccounts.ts index f751f3b..d9df3b8 100644 --- a/packages/huma-web-shared/src/solana/hooks/useSolanaAccounts.ts +++ b/packages/huma-web-shared/src/solana/hooks/useSolanaAccounts.ts @@ -172,13 +172,13 @@ export const useTrancheTokenAccounts = ( getAssociatedTokenAddress( new PublicKey(poolInfo.seniorTrancheMint), publicKey, - false, // allowOwnerOffCurve + true, // allowOwnerOffCurve TOKEN_2022_PROGRAM_ID, ), getAssociatedTokenAddress( new PublicKey(poolInfo.juniorTrancheMint), publicKey, - false, // allowOwnerOffCurve + true, // allowOwnerOffCurve TOKEN_2022_PROGRAM_ID, ), ]) @@ -252,7 +252,7 @@ export const useTokenAccount = ( const associatedTokenAddress = await getAssociatedTokenAddress( new PublicKey(poolInfo.underlyingMint.address), publicKey, - false, // allowOwnerOffCurve + true, // allowOwnerOffCurve TOKEN_PROGRAM_ID, )