fix(ibex): wire USDT LNURL-pay msat conversion#389
Merged
Conversation
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
Contributor
Author
|
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. |
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MilliSatoshisinstead of wallet currency base units.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.mdyarn test:unit --testPathPattern=app/payments/lnurl-pay.spec.tsyarn test:unit --testPathPattern=graphql/public/root/mutation/lnurl-payment-send.spec.ts(passes whendev/config/base-config.yamlincludes the missing Bridgeexternal_accountpublic-key placeholder; sibling config PR fixes this on the base branch)yarn check:sdl(same base-config caveat as above)Notes
bridge.webhook.publicKeys.external_accountis required by schema but absent fromdev/config/base-config.yaml. A separate tiny PR fixes that so this branch can be verified without a local shim.