[ISSUE] Unreliable Transaction Polling in verifyTx

Open
#67 2 comments 0 reactions 0 assignees View on GitHub

@Ghostofficial141 is already working on this.

Since Jan 27, 2026.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
48/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
javascript

Research direction

Start at src/djed/tradeUtils.js around line 140 and read verifyTx to see how the current receipt check handles pending transactions. Reproduce with a transaction whose block time exceeds five seconds, then implement receipt polling with a timeout of about 60 seconds. Done means the function waits for the receipt or reaches the timeout without resolving early.

Written by the indexing model from the issue text.

Description

Description:
The verifyTx function uses a single setTimeout of 5 seconds to check for a transaction receipt.

How to Reproduce:
Submit a transaction on a congested network or a testnet (like Sepolia) with block times >5 seconds.

Actual Behaviour:
The function resolves before the transaction is actually processed, returning a null receipt or failing.

Expected Behaviour:
Implement an exponential backoff or a polling loop that checks for the receipt until a timeout (e.g., 60s) is reached.

Location: StablePay/djed-sdk/src/djed/tradeUtils.js line 140

Dominant language
JavaScript
Stars
16
Forks
29
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from StabilityNexus/StablePay

All issues in StabilityNexus/StablePay

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.