Actions
Bug #1624
openBridge Card Deposit Optimization
Start date:
04/13/2026
Due date:
% Done:
100%
Estimated time:
Description
The Problem
Lack of Uniqueness: The phone column lacked a database-level UNIQUE constraint, allowing duplicate user accounts to be created in the past.
Selective Card Deposit Flakiness: The Bridge-to-PayCrypto deposit flow was unreliable because card selection intent was sometimes lost during the webhook transition, or the system looked up the wrong ID type (Event ID vs Transfer ID).
The Solution
- ** Data Integrity (Migrations)**
Enforced Integrity: Created a migration to add a UNIQUE constraint on the phone column. This prevents any future duplicates at the database level. -
Card Deposit Reliability (Selective Card Flow)
Memory-Based Intent Tracking: Added cardSelectionStore.js to track user card choice in memory using the Bridge Transfer ID as a key.
Priority Lookup Logic : Refactored PayCryptoDepositService.js to use a 3-tier lookup:
Memory : Check the live selection store.
Database : Check the deposit_transactions table.
Fallback : Use Primary/Active card if no selection is found.
Actions