Skip to content

Fix JMD display precision handling in wallet transaction mapping#368

Open
temp4allOG wants to merge 1 commit into
lnflash:mainfrom
temp4allOG:jmd-precision-backend-fix
Open

Fix JMD display precision handling in wallet transaction mapping#368
temp4allOG wants to merge 1 commit into
lnflash:mainfrom
temp4allOG:jmd-precision-backend-fix

Conversation

@temp4allOG
Copy link
Copy Markdown

Summary

Backend-side fixes for JMD precision and display consistency from issue #282.

Included changes

  • src/app/wallets/get-transactions-for-wallet.ts
    • stop hardcoding displayCurrency: "USD"; now uses transaction display currency when available
    • replace Math.floor(...) with Math.round(...) for exchange-rate base conversion to avoid systematic downward truncation
    • prefer settlementDisplayAmount / settlementDisplayFee values from upstream transaction payload when provided
  • src/graphql/shared/types/object/btc-wallet.ts
    • normalize BTC wallet balance before exposing via GraphQL resolver to avoid object-like serialization issues

Notes

  • This PR intentionally focuses on backend fixes in lnflash/flash.
  • Mobile-side changes mentioned in the issue belong to lnflash/flash-mobile and should be handled in a paired PR.

Validation

  • Dependency install completed successfully with engine override in this environment.
  • Typecheck in this environment reports several unrelated pre-existing repo errors under Node 22 / local setup; no new compile errors were introduced in the touched files.

BTC fallback address: 1BL4eV82zZ64Dp4cj3s9EgJ3ae8xPx5ZuJ

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.

1 participant