Skip to content

Commit

Permalink
fix calculateCurrentTipAmount base tip (#273)
Browse files Browse the repository at this point in the history
  • Loading branch information
wphan authored Oct 21, 2024
1 parent 67d4c1b commit b7090bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/bundleSender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,8 @@ export class BundleSender {
calculateCurrentTipAmount() {
return Math.floor(
Math.max(
this.lastTipStream?.landed_tips_25th_percentile ?? 0 * LAMPORTS_PER_SOL,
(this.lastTipStream?.landed_tips_25th_percentile ?? 0) *
LAMPORTS_PER_SOL,
this.minBundleTip,
Math.min(
this.maxBundleTip,
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ const runBot = async () => {
subAccountIds: config.global.subaccounts ?? [0],
txVersion: 0 as TransactionVersion,
txSender,
marketLookupTable
marketLookupTable,
};
const driftClient = new DriftClient(driftClientConfig);
driftClient.eventEmitter.on('error', (e) => {
Expand Down

0 comments on commit b7090bd

Please sign in to comment.