Skip to content
Merged
Prev Previous commit
fix: remove unnecessary nested try catch
  • Loading branch information
bradleyplaydon committed Sep 25, 2025
commit 95125976e7c5f7145b5c57df81592ddb7202ee20
14 changes: 5 additions & 9 deletions src/utils/wallet/solana.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,16 +247,12 @@ async function recoverBlockheightExceededTransaction(
{ retries = 5, delay = 2000 }: { retries?: number; delay?: number } = {},
) {
const findTransaction = async () => {
try {
const tx = await connection.getTransaction(signature, {
commitment: 'confirmed',
maxSupportedTransactionVersion: 0,
});
const tx = await connection.getTransaction(signature, {
commitment: 'confirmed',
maxSupportedTransactionVersion: 0,
});

if (tx) return;
} catch {
// Ignore errors
}
if (tx) return;
};

retry(findTransaction, { retries, delay });
Expand Down
Loading