Skip to content

Commit

Permalink
ALL-5473 - Fix solana mainnet tx - additional logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Hathoriel committed Mar 7, 2024
1 parent cebae2e commit 2c9ef1a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tatumio",
"version": "2.2.59",
"version": "2.2.60",
"license": "MIT",
"repository": "https://github.com/tatumio/tatum-js",
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions packages/blockchain/solana/src/lib/services/solana.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export const solanaUtils = {
})
},
sendTransactionWithConfirm: async (connection: Connection, transaction: Transaction, signers: Signer[]) => {
const attempts = 10
const attempts = 11
const txId = await connection.sendTransaction(transaction, signers)
let confirmedTx
for (let attempt = 1; attempt <= attempts; attempt++) {
Expand All @@ -121,11 +121,11 @@ export const solanaUtils = {
}

if (confirmedTx && confirmedTx.meta?.err) {
throw new Error(`Transaction failed with error: ${confirmedTx.meta?.err}`)
throw new Error(`Transaction ${txId} failed with error: ${confirmedTx.meta?.err}`)
}

throw new Error(
`Transaction not confirmed after ${attempts} attempts, please try to send transaction again.`,
`Transaction ${txId} not confirmed after ${attempts} attempts, please check the status of the transaction or try again.`,
)
},
}

0 comments on commit 2c9ef1a

Please sign in to comment.