ts: comment out, tsc complains
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
This commit is contained in:
parent
8e919bb741
commit
8f6fa5134d
|
@ -4,7 +4,6 @@ import {
|
||||||
Transaction,
|
Transaction,
|
||||||
TransactionInstruction,
|
TransactionInstruction,
|
||||||
} from '@solana/web3.js';
|
} from '@solana/web3.js';
|
||||||
import { buildVersionedTx } from '../utils';
|
|
||||||
|
|
||||||
export async function sendTransaction(
|
export async function sendTransaction(
|
||||||
provider: AnchorProvider,
|
provider: AnchorProvider,
|
||||||
|
@ -17,13 +16,9 @@ export async function sendTransaction(
|
||||||
opts.preflightCommitment,
|
opts.preflightCommitment,
|
||||||
);
|
);
|
||||||
|
|
||||||
let tx: Transaction = new Transaction();
|
|
||||||
const altsEnabled = false;
|
|
||||||
if (altsEnabled) {
|
|
||||||
tx = await buildVersionedTx(provider, ixs, opts.additionalSigners, alts);
|
|
||||||
} else {
|
|
||||||
const payer = (provider as AnchorProvider).wallet;
|
const payer = (provider as AnchorProvider).wallet;
|
||||||
tx = new Transaction();
|
// const tx = await buildVersionedTx(provider, ixs, opts.additionalSigners, alts);
|
||||||
|
const tx = new Transaction();
|
||||||
tx.recentBlockhash = latestBlockhash.blockhash;
|
tx.recentBlockhash = latestBlockhash.blockhash;
|
||||||
tx.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;
|
tx.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;
|
||||||
tx.feePayer = payer.publicKey;
|
tx.feePayer = payer.publicKey;
|
||||||
|
@ -32,7 +27,6 @@ export async function sendTransaction(
|
||||||
tx.partialSign(...opts.additionalSigners);
|
tx.partialSign(...opts.additionalSigners);
|
||||||
}
|
}
|
||||||
await payer.signTransaction(tx);
|
await payer.signTransaction(tx);
|
||||||
}
|
|
||||||
|
|
||||||
const signature = await connection.sendRawTransaction(tx.serialize(), {
|
const signature = await connection.sendRawTransaction(tx.serialize(), {
|
||||||
skipPreflight: true,
|
skipPreflight: true,
|
||||||
|
|
Loading…
Reference in New Issue