use sendRawTx in rpc.ts

This commit is contained in:
tjs 2022-11-21 14:50:24 -05:00
parent ae7acbbc6b
commit 20ff7c99c6
1 changed files with 10 additions and 6 deletions

View File

@ -39,12 +39,16 @@ export async function sendTransaction(
vtx.sign([((provider as AnchorProvider).wallet as any).payer as Signer]);
}
const signature = await connection.sendTransaction(
vtx as any as VersionedTransaction,
{
skipPreflight: true,
},
);
const signature = await connection.sendRawTransaction(vtx.serialize(), {
skipPreflight: true,
});
// const signature = await connection.sendTransactionss(
// vtx as any as VersionedTransaction,
// {
// skipPreflight: true,
// },
// );
if (opts.postSendTxCallback) {
try {