Skip to content

Commit

Permalink
chore: update latestblockhash
Browse files Browse the repository at this point in the history
  • Loading branch information
dongnguyen9186 committed Nov 27, 2024
1 parent 26b791a commit 55336f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ts-client/src/amm/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ export default class AmmImpl implements AmmImplementation {
if (preInstructions.length) {
const preInstructionTx = new Transaction({
feePayer: payer,
...(await ammProgram.provider.connection.getLatestBlockhash(ammProgram.provider.connection.commitment)),
...latestBlockHash,
}).add(...preInstructions);
resultTx.push(preInstructionTx);
}
Expand All @@ -452,7 +452,7 @@ export default class AmmImpl implements AmmImplementation {
});
const mainTx = new Transaction({
feePayer: payer,
...latestBlockHash,
...(await ammProgram.provider.connection.getLatestBlockhash(ammProgram.provider.connection.commitment)),
})
.add(setComputeUnitLimitIx)
.add(createPermissionlessPoolTx);
Expand Down

0 comments on commit 55336f3

Please sign in to comment.