Skip to content

feat(bridge): push notification on deposit settlement [ENG-275]#392

Open
islandbitcoin wants to merge 1 commit into
tmp/bridge-rebase-pr-readyfrom
eng-275-bridge-push
Open

feat(bridge): push notification on deposit settlement [ENG-275]#392
islandbitcoin wants to merge 1 commit into
tmp/bridge-rebase-pr-readyfrom
eng-275-bridge-push

Conversation

@islandbitcoin
Copy link
Copy Markdown
Contributor

ENG-275 — Push notification on /deposit and /transfer

Completes the deposit side of ENG-275. The withdrawal-completion push already exists (transfer.tssendBridgeWithdrawalNotificationBestEffort on transfer.completed/failure), so this PR adds the missing deposit settlement push (the must-have launch gate).

Where it fires

A Bridge USDT deposit settles when IBEX sends its crypto.received webhook. The push is fired at the success point of services/ibex/webhook-server/routes/crypto-receive.ts, where:

  • the account is resolved (findByBridgeEthereumAddress — so it's Bridge-specific),
  • the USDT amount is validated,
  • and it's inside the per-txHash LockService block → idempotent, fires once per deposit.

What's added

  • src/app/bridge/send-deposit-notification.tssendBridgeDepositNotification(BestEffort), mirroring the existing withdrawal-notification function (resolve account→user→deviceTokens, PushNotificationsService().sendFilteredNotification, best-effort token-cleanup + warn).
  • notification.bridgeDeposit.{title,body} i18n phrases in en.json + es.json.
  • One call wired into the crypto-receive settlement handler.

Notes

  • Server-side trigger only (per ticket); mobile display/config is the separate Nick ticket.
  • No new env/config — reuses the existing push-notification infrastructure (FCM).
  • Currency display mirrors the withdrawal notif (USDT → "USD" in the payload).
  • Diff is purely additive (+113 / -0). New file lint-clean; touched files type-check. (Pre-existing base lint/test debt in surrounding files is not touched.)

Acceptance

  • A successful Bridge deposit (crypto.received settles) triggers a push; a successful withdrawal (transfer.completed) already does. Mobile receives + displays (Nick's client work).

🤖 Generated with Claude Code

Fires a best-effort push when a Bridge USDT deposit settles via the IBEX
crypto.received webhook (the must-have launch gate). Mirrors the existing
sendBridgeWithdrawalNotification pattern:
- new src/app/bridge/send-deposit-notification.ts
- wired at the crypto-receive settlement success (idempotent — inside the
  per-txHash lock; fires once)
- notification.bridgeDeposit i18n phrases (en + es)

Withdrawal-completion push already exists (transfer.ts) — this completes the
deposit side. IBEX→USD currency display mirrors the withdrawal notif.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@linear
Copy link
Copy Markdown

linear Bot commented Jun 6, 2026

ENG-275

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