Skip to content

Commit

Permalink
Merge pull request #22 from valentinmadrid/main
Browse files Browse the repository at this point in the history
Fix sendTransaction error (Typeerror: Illegal Invocation)
  • Loading branch information
kevinheavey authored Jun 1, 2024
2 parents e4e4067 + 9c5c3c1 commit 0bbc735
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions solana-bankrun/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,11 @@ export class BanksClient {
async sendTransaction(tx: Transaction | VersionedTransaction) {
const serialized = tx.serialize();
const internal = this.inner;
const method =
tx instanceof Transaction
? internal.sendLegacyTransaction
: internal.sendVersionedTransaction;
await method(serialized);
if (tx instanceof Transaction) {
await internal.sendLegacyTransaction(serialized);
} else {
await internal.sendVersionedTransaction(serialized);
}
}

/**
Expand Down

0 comments on commit 0bbc735

Please sign in to comment.