Skip to content

Commit

Permalink
Cap price at 200k
Browse files Browse the repository at this point in the history
  • Loading branch information
mliu committed Jan 8, 2025
1 parent 0c79106 commit 7018462
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async function buildOptimalTransactionImpl(
const medianFee = recentFees.sort((a, b) => a - b)[
Math.floor(recentFees.length / 2)
]
const chosenFee = medianFee
const chosenFee = Math.min(200_000, medianFee)

tx.instructions.unshift(
ComputeBudgetProgram.setComputeUnitPrice({
Expand Down

0 comments on commit 7018462

Please sign in to comment.