Repository navigation
fix(wallet): allow relinking a pocket with an unfinished US bank link - #76
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 rawcreation_in_progressstatus.How it works
isPendingLinkUsBankandblocksUsBankLink: only usable or activating banks block a new link; failed and unfinished ones don't.blocksUsBankLink.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.Changes
domain/accounts/external-us-bank.ts+ testsroutes/_authed/topup/us-banks/index.tsx,routes/_authed/accounts/$urn.tsxi18nes/en:accounts.detail.usBankPendingLinkDev 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.