Skip to content

fix(bridge): clear stale LiFi pending transfers#365

Open
dewanshparashar wants to merge 1 commit into
masterfrom
fix/vet-stale-lifi-pending-transfers
Open

fix(bridge): clear stale LiFi pending transfers#365
dewanshparashar wants to merge 1 commit into
masterfrom
fix/vet-stale-lifi-pending-transfers

Conversation

@dewanshparashar

@dewanshparashar dewanshparashar commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

A LiFi transfer gets cached as "pending" as soon as the wallet hands back a source tx hash. If that transaction never actually lands on-chain (reverted, or dropped from the mempool and never mined), the entry stays "pending" forever — LiFi's status API keeps reporting PENDING for a hash it never saw, so nothing ever reconciles it. This is what a user hit: two transfers stuck pending in their browser, funds still on the source chain.

This adds a check in getUpdatedLifiTransfer that vets the cached source tx against the chain before trusting LiFi's status:

  • source tx reverted (receipt status 0) -> mark failed
  • no receipt and the node no longer knows the tx, after a 30 min grace -> dropped, mark failed
  • otherwise (confirmed or still propagating) -> unchanged, falls through to LiFi status

Once marked failed the entry leaves the pending list and stops being re-polled.

Fixes SUP-1452

@vercel

vercel Bot commented Jun 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
arbitrum-portal Ready Ready Preview Jun 19, 2026 3:10pm

Request Review

@dewanshparashar
dewanshparashar marked this pull request as ready for review June 19, 2026 14:51
Copilot AI review requested due to automatic review settings June 19, 2026 14:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR prevents LiFi transfers from remaining “pending” indefinitely when the cached source tx hash never lands on-chain, by cross-checking the source transaction against the chain before relying on LiFi’s status endpoint.

Changes:

  • Added a 30-minute grace window and on-chain vetting for LiFi source transactions.
  • Marked transfers as terminal FAILURE when the source tx is reverted or dropped (no receipt + node no longer has the tx after the grace window).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/arb-token-bridge-ui/src/components/TransactionHistory/helpers.ts Outdated
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