소스 검색

fix: sell function

Filip Dunder 1 년 전
부모
커밋
19a09370b1
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      buy.ts

+ 1 - 1
buy.ts

@@ -324,8 +324,8 @@ async function sell(accountData: LiquidityStateV4, poolKeys: LiquidityPoolKeys):
           instructions: [
             ComputeBudgetProgram.setComputeUnitLimit({ units: 400000 }),
             ComputeBudgetProgram.setComputeUnitPrice({ microLamports: 200000 }),
-            createCloseAccountInstruction(tokenAccount.address, wallet.publicKey, wallet.publicKey),
             ...innerTransaction.instructions,
+            createCloseAccountInstruction(tokenAccount.address, wallet.publicKey, wallet.publicKey),
           ],
         }).compileToV0Message();
         const transaction = new VersionedTransaction(messageV0);