Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in
F
finwise-miniapp-fe
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • ThinhNC
  • finwise-miniapp-fe
  • Merge Requests
  • !40

Merged
Opened Sep 12, 2026 by ThinhNC@ThinhNC
  • Report abuse
Report abuse

feat(calculator): integrate currency converter and refine modal positioning & branding

Summary of Changes

This pull request introduces a currency conversion feature into the transaction calculator (CalculatorModal), improves calculator modal positioning on mobile devices, and resolves browser title and favicon synchronization.


Key Features & Improvements

1. Currency Conversion in Calculator (CalculatorModal)

  • Exchange Rate Engine (currency.service.ts & currency.ts):
    • Provides standard baseline exchange rates for 11 popular currencies: VND, USD, EUR, JPY, KRW, CNY, GBP, THB, SGD, AUD, CAD.
    • Supports automatic fetching of latest market rates with offline fallback and a 12-hour localStorage cache.
    • Accurate conversion logic with currency-specific decimal rounding rules (0 decimals for VND, JPY, KRW; 2 decimals for USD, EUR, etc.).
  • Claymorphism UI & Controls:
    • Clean circular icon-only toggle button (ExchangeIcon, size 18) in the modal header for seamless activation.
    • Interactive conversion panel with From and To currency selectors and a 1-tap swap button (⇄).
    • Real-time exchange rate indicator (1 USD = 25,450 VND) with custom rate editing option.
    • Live preview and a single-click Apply button that updates the calculator display immediately.
  • Form Integration:
    • Automatically derives the default target currency from the currently selected wallet in TransactionFormModal and WalletFormModal.

2. Mobile Layout & Alignment Fixes

  • Centered the CalculatorModal dialog across all viewport sizes (including mobile devices) instead of anchoring as a bottom sheet.
  • Uniform 4-corner rounded Claymorphic borders (rounded-clay-lg & border border-clay-highlight/60) and safe padding with my-auto scrolling for small viewports.

3. Browser Title & Favicon Synchronization

  • Updated index.html to reference /src/static/logo.png directly via Vite asset pipeline.
  • Added cross-frame synchronization in DocumentTitle.tsx to push title and favicon updates to the parent window when running inside the Zalo Mini App Simulator iframe.

4. Internationalization (i18n)

  • Added comprehensive translation keys for currency conversion in both vi.json and en.json (compact "Áp dụng" / "Apply" action buttons).

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch origin
git checkout -b feat/calculator-currency-converter origin/feat/calculator-currency-converter

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git fetch origin
git checkout origin/develop
git merge --no-ff feat/calculator-currency-converter

Step 4. Push the result of the merge to GitLab

git push origin develop

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

  • Discussion 0
  • Commits 1
  • Changes 12
Assignee
No assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
0
Labels
None
Assign labels
  • View project labels
Reference: ThinhNC/finwise-miniapp-fe!40

Revert this merge request

This will create a new commit in order to revert the existing changes.

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.