Skip to content

feat(bridge): external account webhook + ENG-350 transfer failure reset#373

Open
heyolaniran wants to merge 3 commits into
lnflash:tmp/bridge-rebase-pr-readyfrom
heyolaniran:pr/eng-350-bridge-external-account
Open

feat(bridge): external account webhook + ENG-350 transfer failure reset#373
heyolaniran wants to merge 3 commits into
lnflash:tmp/bridge-rebase-pr-readyfrom
heyolaniran:pr/eng-350-bridge-external-account

Conversation

@heyolaniran
Copy link
Copy Markdown
Contributor

@heyolaniran heyolaniran commented May 28, 2026

Summary

  • feat(externalAccounts): Adds POST /external-account webhook handler — fires after Plaid bank-linking completes, persists the linked account to MongoDB so bridgeExternalAccounts queries return results. Wires up signature verification, replay routing, and idempotency lock.
  • fix(ENG-350): Removes dead event === "transfer.failed" branch (Bridge sends transfer.updated.status_transitioned, not transfer.failed). Failure detection is now purely by terminal state value. Updates test samples and failure cases to use the real event type.
  • feat(bruno): Adds Bruno request files for bridgeAddExternalAccount, bridgeInitiateWithdrawal, bridgeExternalAccounts, and bridgeWithdrawals.

Test plan

  • Insert external account seed doc into bridgeexternalaccounts, query bridgeExternalAccounts — confirms id resolver and status mapping
  • Fire external_account.created via /internal/replay — confirms account persisted and idempotency on duplicate event
  • Insert pending withdrawal, fire transfer.updated.status_transitioned with a terminal state via /internal/replay — confirms status flips to failed and push notification dispatched
  • Duplicate webhook returns already_terminal, no double notification

feat: external accounts event triggering

this commit initialize the webhook endpoint to register on Bridge to trigger external account link after plaid completion
this commit mark the transfer as failed in our bridge withdrawals collection when something went wrong during the trasfer flow, the user is notified with a popup and on return state, as well for transfer successfully completed
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