Skip to content

feat: pass transaction id to status request#365

Merged
chybisov merged 1 commit intomainfrom
feat-txid-to-status
Mar 19, 2026
Merged

feat: pass transaction id to status request#365
chybisov merged 1 commit intomainfrom
feat-txid-to-status

Conversation

@melianessa
Copy link
Copy Markdown
Contributor

Which Linear task is linked to this PR?

Why was it implemented this way?

Explain the reasoning behind the implementation. Were there alternative approaches? Why was this solution chosen?

Visual showcase (Screenshots or Videos)

If applicable, attach screenshots, GIFs, or videos to showcase the functionality, UI changes, or bug fixes.

Checklist before requesting a review

  • I have performed a self-review and testing of my code.
  • This pull request is focused and addresses a single problem.
  • If this PR modifies the SDK API or adds new features that require documentation, I have updated the documentation in the public-docs repository.

@melianessa melianessa requested a review from chybisov March 19, 2026 14:34
toChain: step.action.toChainId,
txHash,
...(step.tool !== 'custom' && { bridge: step.tool }),
...(step.transactionId && { transactionId: step.transactionId }),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You added transactionId to the getStatus call but the module-level cache TRANSACTION_HASH_OBSERVERS is still keyed only by txHash. This can cause cached responses to be reused across requests with different transactionId values. Consider including transactionId in the cache key or avoid module-level per-request caching.

Details

✨ AI Reasoning
​A module-level cache (TRANSACTION_HASH_OBSERVERS) stores promises keyed by txHash. The PR adds transactionId into the request payload, so two requests with the same txHash but different transactionId will still reuse the same cached promise. This can leak or mix request-specific data between callers and cause incorrect status results. The problem was introduced/worsened by adding transactionId to the request without changing caching behavior.

🔧 How do I fix it?
Avoid storing request-specific data in module-level variables. Use request-scoped variables or explicitly mark shared caches as intentional.

Reply @AikidoSec feedback: [FEEDBACK] to get better review comments in the future.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info

@chybisov chybisov merged commit 73f49ae into main Mar 19, 2026
2 checks passed
@chybisov chybisov deleted the feat-txid-to-status branch March 19, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants