Skip to content

fix(wallet): allow relinking a pocket with an unfinished US bank link - #76

Merged
MakelangelOO merged 1 commit into
developfrom
eub-retry
Oct 2, 2026
Merged

MakelangelOO merged 1 commit into
developfrom
eub-retry

Conversation

@MakelangelOO

Copy link
Copy Markdown
Collaborator

Linear: BQE-2732

Why

A pocket whose US bank link was opened but never finished (creation_in_progress + pending_link) counts as "already has a bank": it disappears from the linkable pockets and the add-product picker, and stays blocked until the backend fails the attempt (~52h). The detail screen also shows the raw creation_in_progress status.

How it works

  • New isPendingLinkUsBank and blocksUsBankLink: only usable or activating banks block a new link; failed and unfinished ones don't.
  • Topup linkable pockets and the account-detail add-product picker use blocksUsBankLink.
  • Retrying on that pocket sends the same ledgerId; the backend (bloque-app/payment-rails#994) reuses the open attempt or, if its token expired, closes it and creates a new one. No duplicate rows.
  • Detail shows "Vinculación sin terminar" / "Linking not finished" for unfinished links.

Changes

  • domain/accounts/external-us-bank.ts + tests
  • routes/_authed/topup/us-banks/index.tsx, routes/_authed/accounts/$urn.tsx
  • i18n es/en: accounts.detail.usBankPendingLink

Dev requirements

Merge only after bloque-app/payment-rails#994 is deployed. Without it, a retry can pick up an open attempt on a different pocket, or add a row next to the expired one.

Risk

Low. UI-only; a pocket with an unfinished link shows the link option again.

@MakelangelOO MakelangelOO self-assigned this Oct 1, 2026
@linear

linear Bot commented Oct 1, 2026

Copy link
Copy Markdown

BQE-2732

@MakelangelOO
MakelangelOO merged commit b00f994 into develop Oct 2, 2026
2 checks passed
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.

1 participant