Skip to content

Commit

Permalink
Comment out transaction confirmation until it's fixed on Solana
Browse files Browse the repository at this point in the history
  • Loading branch information
martincik committed Oct 21, 2022
1 parent fb8727d commit 4a09ef2
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions src/libs/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,31 +28,31 @@ export const sendTx = async (

const signature = await sendTransaction(transaction, connection, sendOptions);

// TODO: https://github.com/solana-labs/solana/pull/28290
const status =
transaction.recentBlockhash != null &&
transaction.lastValidBlockHeight != null
? (
await connection.confirmTransaction(
{
signature: signature,
...latestBlockHash,
},
options && options.commitment
)
).value
: (
await connection.confirmTransaction(
signature,
options && options.commitment
)
).value;
// TODO: Return back after this resolves: https://github.com/solana-labs/solana/pull/28290
// const status =
// transaction.recentBlockhash != null &&
// transaction.lastValidBlockHeight != null
// ? (
// await connection.confirmTransaction(
// {
// signature: signature,
// ...latestBlockHash,
// },
// options && options.commitment
// )
// ).value
// : (
// await connection.confirmTransaction(
// signature,
// options && options.commitment
// )
// ).value;

if (status.err) {
throw new Error(
`Transaction ${signature} failed (${JSON.stringify(status)})`
);
}
// if (status.err) {
// throw new Error(
// `Transaction ${signature} failed (${JSON.stringify(status)})`
// );
// }

console.log('Signature: ', signature);
return signature;
Expand Down

0 comments on commit 4a09ef2

Please sign in to comment.