Skip to content

ENG-296: Align ETH-USDT Cash Wallet receive path#344

Draft
forge0x wants to merge 1 commit into
feature/bridge-integrationfrom
eng-296/ibex-usdt-provisioning
Draft

ENG-296: Align ETH-USDT Cash Wallet receive path#344
forge0x wants to merge 1 commit into
feature/bridge-integrationfrom
eng-296/ibex-usdt-provisioning

Conversation

@forge0x
Copy link
Copy Markdown
Contributor

@forge0x forge0x commented May 9, 2026

Rebuilt on current feature/bridge-integration after ENG-394 landed.

ENG-296 is now narrowed to ETH-USDT Cash Wallet receive-path alignment. Wallet creation/defaulting is already handled by ENG-394, and Bridge virtual-account creation/query behavior is intentionally left to the dedicated Bridge VA tickets.

Changes:

  • Accept IBEX crypto.receive webhooks for Ethereum USDT (currency=USDT, network=ethereum)
  • Normalize persisted receive metadata to USDT / ethereum
  • Reject stale Tron USDT payloads on this ETH-USDT Cash Wallet path
  • Add focused unit coverage for Ethereum USDT receive handling

Tests:

  • PASS: LOGLEVEL=warn ../../node_modules/.bin/jest --config ./test/flash/unit/jest.config.js --bail --verbose test/flash/unit/services/ibex/webhook-server/routes/crypto-receive.spec.ts
  • PASS: git diff --check
  • NOTE: full tsc --noEmit -p tsconfig.d.json && tsc --noEmit still fails on inherited baseline test/legacy-integration type errors unrelated to this PR.

@linear
Copy link
Copy Markdown

linear Bot commented May 9, 2026

ENG-296

@patoo0x
Copy link
Copy Markdown
Contributor

patoo0x commented May 10, 2026

I created a Flash engineering review artifact for this PR.

Full rendered artifact: https://htmlpreview.github.io/?https://github.com/lnflash/flash/blob/patoo0x/pr-344-review-artifact/docs/artifacts/pr-344/eth-usdt-cash-wallet-review.html
Source file: https://github.com/lnflash/flash/blob/patoo0x/pr-344-review-artifact/docs/artifacts/pr-344/eth-usdt-cash-wallet-review.html

Quick review takeaway: good direction, but I would not merge until the migration/address-ownership questions are closed.

Critical / high-risk items to verify:

  • Existing bridgeEthereumAddress values can bypass new IBEX receive-info creation. Can we prove every existing address is tied to the correct ETH-USDT IBEX wallet, or do we need a migration/backfill?
  • ensureEthUsdtCashWallet(account) runs before the existing-VA idempotency guard. Is it intentional to promote the USDT wallet to default even when a Bridge VA already exists?
  • Ibex.getAccountDetails(walletId, currency) converts balances based on caller-provided currency. Are all callsites audited so we do not create wrong-unit balance reads?
  • Webhook now accepts USDT + ethereum and rejects Tron. Confirm upstream payloads and existing customer deposit instructions are fully cut over.
  • Withdrawal idempotency is improved, but concurrent retries still need DB-level uniqueness/transactional protection against duplicate pending rows.
  • PR body says tests/build passed, but GitHub shows Checks (0), so CI/build evidence should be attached or run before merge.

Note: I could not enable GitHub Pages on lnflash/flash from this account; repository settings show no Pages/options access. The rendered link above uses the uploaded GitHub branch file via htmlpreview as an interim full-artifact view.

@lnflash lnflash deleted a comment from patoo0x May 10, 2026
@lnflash lnflash deleted a comment from patoo0x May 10, 2026
@islandbitcoin islandbitcoin marked this pull request as draft May 11, 2026 23:59
@forge0x forge0x force-pushed the eng-296/ibex-usdt-provisioning branch from 659098e to 21533d6 Compare May 12, 2026 11:48
@forge0x forge0x changed the title ENG-296: Provision ETH-USDT cash wallet via IBEX ENG-296: Align ETH-USDT Cash Wallet receive path May 12, 2026
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