Merge pull request #45 from fdundjer/fix/sell-function

fix: sell function
This commit is contained in:
Filip Dunđer
2024-03-04 19:50:19 +01:00
committed by GitHub
+1 -1
View File
@@ -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);