Skip to content

Commit

Permalink
remove simulation
Browse files Browse the repository at this point in the history
  • Loading branch information
NourAlharithi committed Jan 15, 2025
1 parent 02d46e1 commit 2bd3fe3
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions ts/sdk/src/jitProxyClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import {
PublicKey,
SYSVAR_INSTRUCTIONS_PUBKEY,
TransactionInstruction,
TransactionMessage,
VersionedTransaction,
} from '@solana/web3.js';
import { Program } from '@coral-xyz/anchor';
import { TxSigAndSlot } from '@drift-labs/sdk';
Expand Down Expand Up @@ -103,27 +101,6 @@ export class JitProxyClient {
[...swiftTakerIxs, ix],
txParams
);
let resp;
try {
const message = new TransactionMessage({
payerKey: this.driftClient.wallet.payer.publicKey,
recentBlockhash: (
await this.driftClient.connection.getLatestBlockhash()
).blockhash,
instructions: [...swiftTakerIxs, ix],
}).compileToV0Message([this.driftClient.lookupTableAccount]);

const tx = new VersionedTransaction(message);
resp = await this.driftClient.connection.simulateTransaction(tx, {
sigVerify: false,
replaceRecentBlockhash: true,
commitment: 'processed',
});
console.log(resp);
} catch (e) {
console.error(e);
}

return await this.driftClient.sendTransaction(tx);
}

Expand Down

0 comments on commit 2bd3fe3

Please sign in to comment.