Skip to content

fix(ibex): wire USDT LNURL-pay msat conversion#389

Merged
islandbitcoin merged 2 commits into
tmp/bridge-rebase-pr-readyfrom
eng-406/usdt-lnurl-pay
Jun 7, 2026
Merged

fix(ibex): wire USDT LNURL-pay msat conversion#389
islandbitcoin merged 2 commits into
tmp/bridge-rebase-pr-readyfrom
eng-406/usdt-lnurl-pay

Conversation

@patoo0x
Copy link
Copy Markdown
Contributor

@patoo0x patoo0x commented Jun 6, 2026

Summary

  • Fixes the IBEX LNURL-pay wrapper so callers pass explicit MilliSatoshis instead of wallet currency base units.
  • Adds a USD/USDT wallet LNURL-pay mutation that decodes LNURL metadata, converts through dealer pricing, validates whole-satoshi msats and LNURL bounds, then calls IBEX.
  • Adds focused helper/resolver tests and updates the public schema/supergraph.

Test Plan

  • npx prettier --check src/domain/errors.ts src/services/ibex/client.ts src/services/ibex/index.types.d.ts src/app/payments/lnurl-pay.ts src/graphql/error-map.ts src/graphql/public/root/mutation/lnurl-payment-send.ts src/graphql/public/mutations.ts test/flash/unit/app/payments/lnurl-pay.spec.ts test/flash/unit/graphql/public/root/mutation/lnurl-payment-send.spec.ts docs/plans/2026-06-05-eng-406-usdt-lnurl-units.md
  • yarn test:unit --testPathPattern=app/payments/lnurl-pay.spec.ts
  • yarn test:unit --testPathPattern=graphql/public/root/mutation/lnurl-payment-send.spec.ts (passes when dev/config/base-config.yaml includes the missing Bridge external_account public-key placeholder; sibling config PR fixes this on the base branch)
  • yarn check:sdl (same base-config caveat as above)

Notes

  • This is intentionally split from ENG-274 / the Bridge sandbox e2e PR.
  • Base branch currently has a config/schema mismatch: bridge.webhook.publicKeys.external_account is required by schema but absent from dev/config/base-config.yaml. A separate tiny PR fixes that so this branch can be verified without a local shim.

forge0x added 2 commits June 5, 2026 18:05
The IBEX LNURL-pay API (POST /v2/lnurl/pay/send) expects the amount
in millisatoshis, but PayLnurlArgs.send.amount passed the wallet
currency's base unit directly (USDT micros, USD cents, or BTC sats).

Changed PayLnurlArgs to accept amountMsat: number instead of
send: IbexCurrency. This makes the expected unit explicit and forces
callers to perform the msat conversion at the app layer where the
DealerPriceService is available.

ENG-406
@linear
Copy link
Copy Markdown

linear Bot commented Jun 6, 2026

ENG-406

@patoo0x
Copy link
Copy Markdown
Contributor Author

patoo0x commented Jun 6, 2026

Companion base-branch hygiene PR: #390. That PR fixes the missing Bridge external_account config/schema drift on tmp/bridge-rebase-pr-ready; after applying that fix, this ENG-406 branch's GraphQL mutation test and check:sdl pass without a local config shim.

@islandbitcoin islandbitcoin merged commit 9633256 into tmp/bridge-rebase-pr-ready Jun 7, 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.

3 participants