1

We purchased the Paid RPC in Quicknode. Plan - Solana Digital Asset Standard API by QuickNode

Please respond quickly. And more customers are using our NFT platform. Please let me know what actions are being taken.

Issue :

NftMintingDetailsComponent ~ this.dataService.postRequest ~ this.error: TransactionExpiredTimeoutError: Transaction was not confirmed in 30.00 seconds. It is unknown if it succeeded or failed. Check signature 2fj22B2a1RTixEwQhaB5rMKpAR2biEv5Hqa45RA5szUbJv8kzmHtxkmwjL3pmoXP2dDmEJ8TPC9vzGZY4EGgQjgb using the Solana Explorer or CLI tools. at main.cfecd82b7705d8ca.js:1:404986 at Generator.next () at l (main.cfecd82b7705d8ca.js:1:1141129) at X (main.cfecd82b7705d8ca.js:1:1141340) at v.invoke (polyfills.25996055e980a3f2.js:1:6569) at Object.onInvoke (main.cfecd82b7705d8ca.js:1:912876) at v.invoke (polyfills.25996055e980a3f2.js:1:6509) at L.run (polyfills.25996055e980a3f2.js:1:1950) at polyfills.25996055e980a3f2.js:1:16779 at v.invokeTask (polyfills.25996055e980a3f2.js:1:7187)

1

1 Answer 1

1

From the question, I assume you're confirming transactions with connection.confirmTransaction(signature, "confirmed)

Try using this instead:

const block = await connection.getLatestBlockhash("confirmed");
const result = await connection.confirmTransaction(
    {
      signature,
      ...block,
    },
    "confirmed",
);

const error = result.value.err;
if (error) {
    throw Error(error.toString());
}

This will confirm based on block height rather than a 30sec threshold. Additionally, if you aren't already, consider prepending a priority fee to your transactions:

const addPriorityFee = ComputeBudgetProgram.setComputeUnitPrice({
    microLamports: <microlamport fee>,
});

EDIT: There are better ways to do confirmations that are a bit more involved, but those are out of the scope of this question

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.