Add display settings UI & format utilities#163
Merged
BlobMaster41 merged 5 commits intomasterfrom Feb 21, 2026
Merged
Conversation
Add new display settings UI and formatting utilities: introduces DisplaySetupPopup component and DisplaySettingsScreen, plus integrations in SettingsTabScreen and MainRoute. Add BigintToString and formatAmount utilities with tests and update OpNet-related bigint formatting and OpNetBalanceCard to use them. Update settings state (hooks and reducer) to persist display preferences. Also update package.json and tsconfig (and regenerate lockfile) for dependency/tooling bumps.
Add vitest.config.ts and update package.json/package-lock.json to use Vitest and related packages; remove Jest-related dependencies (and testing-library jest-dom). Move unit test files from src/... to tests/... (renamed/moved BigintToString.test.ts and formatAmount.test.ts). Also includes minor dependency adjustments in package-lock (e.g. opnet version change).
Refactor amount formatting to use BigNumber for precision and to never emit scientific notation (BigNumber.config EXPONENTIAL_AT set). formatAmount now parses inputs into BigNumber, applies K/M/B scaling, comma insertion, and uses ROUND_DOWN for fixed decimals; removed the old formatFixed helper. BigintToString dust handling updated to compute decimal places and return a trimmed toFixed string (never scientific). DisplaySetupPopup now hides the setup UI in notification windows and when the app is locked (imports useIsUnlocked and getUiType). Tests updated to expect non-scientific representation for very small/dust values.
Update package.json and regenerate package-lock.json to apply dependency upgrades. Notable bumps include @types/chrome, @types/node, glob, i18next, opnet (rc.7), postcss-preset-env, rollup (4.58.0) and multiple @csstools/postcss packages; also adds @csstools/postcss-font-width-property. This commit syncs the lockfile with the updated package manifest and applies transitive package version updates across the dependency tree.
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.
Description
Add new display settings UI and formatting utilities: introduces DisplaySetupPopup component and DisplaySettingsScreen, plus integrations in SettingsTabScreen and MainRoute. Add BigintToString and formatAmount utilities with tests and update OpNet-related bigint formatting and OpNetBalanceCard to use them. Update settings state (hooks and reducer) to persist display preferences. Also update package.json and tsconfig (and regenerate lockfile) for dependency/tooling bumps.
Type of Change
Checklist
Build & Tests
npm installcompletes without errorsnpm run build:chromebuilds successfullyCode Quality
Documentation
Security
OPWallet Specific
Testing
Browser Testing
Screenshots
Related Issues
By submitting this PR, I confirm that my contribution is made under the terms of the project's license.