Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • A Ahad Mobile
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • holatech
  • Ahad Mobile
  • Merge requests
  • !160

fix(home): align transaction rows with the transaction's own currency

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Hung Hoang requested to merge hunghoang/fix/transaction-currency-mismatch into develop Oct 31, 2026
  • Overview 1
  • Commits 2
  • Pipelines 2
  • Changes 5

Summary

Fixes the Home transaction list showing a converted line in a currency the transaction was not in, which read as a currency mismatch.

  • Lark bug: https://hola-tech.sg.larksuite.com/record/BwmOreap7eSkWkcNDFXlCAv8gff
  • Priority: Medium
  • Module: Home / All Transactions

Root Cause

TransactionItem rendered the second line as convertAmount + ' ' + selectedCurrency.

  • convertTransactionAmount returns a value for every fiat/crypto transaction, including one already denominated in selectedCurrency (identity conversion).
  • A 5 USDC withdrawal therefore showed - 5.00 USDC above and 5.00 USD below — the same number under a different code — and a 2 USD card top-up repeated - 2.00 USD / 2.00 USD.
  • Unlike the Assets list, the line had no ~ prefix marking it as a conversion.

Changes

  1. fe/src/lib/home/transaction-amount.utils.ts
    • convertTransactionAmount now returns null when the transaction's currency already equals the selected currency (both the crypto token branch and the fiat branch), so no redundant second line is rendered.
    • Comment updated to state both reasons the converted line is omitted.
  2. fe/src/app/home/transaction.tsx
    • The remaining genuine conversions are rendered with the same ~ prefix the Assets list uses (~ 11.10 EUR), so a number under a currency code is unambiguously an estimate in that currency.

Behaviour after the fix

Transaction Before After
Withdrawal 5 USDC (selected USD) - 5.00 USDC / 5.00 USD - 5.00 USDC / ~ 5.00 USD
Card Top Up 2 USD (selected USD) - 2.00 USD / 2.00 USD - 2.00 USD
Transaction 12 USD (selected EUR) - 12.00 USD / 11.10 EUR - 12.00 USD / ~ 11.10 EUR

Verification

  • fe/src/lib/home/transaction-amount.utils.test.ts -> 8 tests, added coverage for identity conversions (USD->USD, USDC->USDC, HKD->HKD) returning null.
  • fe/src/components/home/transaction-balance-mask.test.tsx -> updated assertion to the ~ prefix.
  • All Home-related suites: 9 suites / 47 tests passed.
  • pnpm type-check: 0 errors. ESLint on modified files: 0 errors.
  • Conventional commitlint: passed.
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: hunghoang/fix/transaction-currency-mismatch