You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
formatPriceWithSubscriptNotation was capping decimal places at 4 for values under 1, which meant two similar thresholds like $0.00181069 and $0.00182069 would both display as $0.0018. Added a maximumFractionDigits override so the manage alerts list can pass 15 and preserve the stored precision.
Changelog
CHANGELOG entry: show correct decimal places when managing price alerts
Feature: my feature nameScenario: user [verb for user action]Given [describe expected initial app state]
When user [verb for user action]
Then [describe expected outcome]
I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
Note
Low Risk
Display-only formatting with an opt-in override on a shared helper; no API or persistence changes.
Overview Manage price alerts no longer collapses similar sub-dollar thresholds to the same rounded label (e.g. both showing $0.0018). The list now passes maximumFractionDigits: 15 into formatPriceWithSubscriptNotation so stored values like $0.00181069 and $0.00182069 stay distinguishable.
formatPriceWithSubscriptNotation gains an optional maximumFractionDigits override on the non-subscript path; default behavior elsewhere stays 2 decimals for ≥1 and 4 for <1. A regression test covers sub-cent threshold copy, and a small keypad doc example in create-alert was updated for extreme tiny prices.
Reviewed by Cursor Bugbot for commit 3612636. Bugbot is set up for automated code reviews on this repo. Configure here.
PR template — items to address before "Ready for review"
Warnings — informational, address before merging:
Manual testing steps still contain template content (the Gherkin example title or a [...] placeholder). Replace with real steps, or write N/A — <reason>.
Selected Performance tags: None (no tests recommended)
Risk Level: low
AI Confidence: 90%
click to see 🤖 AI reasoning details
E2E Test Selection:
The PR makes targeted, low-risk changes:
CreatePriceAlertView.tsx: Only cosmetic changes (removed a comment, removed a blank line, updated a JSDoc example string). No functional logic changes.
ManagePriceAlertsView.tsx: Adds { maximumFractionDigits: 15 } to a formatPriceWithSubscriptNotation call to preserve full precision for sub-cent price alert thresholds. This is a UI display fix for a feature-flagged component.
format.ts (Predict utils): Extends FormatPriceWithSubscriptNotationOptions interface with an optional maximumFractionDigits property and updates formatPriceWithSubscriptNotation to use it when provided. This is a backward-compatible change — all existing callers (AssetOverview Price, TokenListItem, Bridge BatchSellTokenRow, Charts) continue to work with the same default behavior since the new parameter is optional with existing defaults.
ManagePriceAlertsView.test.tsx: Adds a unit test for the new precision behavior.
Why no E2E tags are needed:
Price Alerts is a feature-flagged UI component with no existing E2E test coverage (no spec files found for PriceAlerts).
The formatPriceWithSubscriptNotation utility change is backward-compatible — no existing callers are affected.
The change does not touch any shared navigation, modals, confirmations, or core wallet flows.
SmokeWalletPlatform covers token lists and asset loading, but the utility change is additive and non-breaking.
No performance-sensitive code paths are modified.
Performance Test Selection:
The changes are limited to UI display formatting for price alert thresholds and a backward-compatible extension of a formatting utility. No performance-sensitive code paths (asset loading, rendering loops, data fetching) are modified. No performance test tags are warranted.
No release label on PR. Adding release label release-8.1.0 on PR, as PR was added to branch 8.1.0 when release was cut.
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
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
formatPriceWithSubscriptNotationwas capping decimal places at 4 for values under 1, which meant two similar thresholds like$0.00181069and$0.00182069would both display as$0.0018. Added amaximumFractionDigitsoverride so the manage alerts list can pass15and preserve the stored precision.Changelog
CHANGELOG entry: show correct decimal places when managing price alerts
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/ASSETS-3404
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Low Risk
Display-only formatting with an opt-in override on a shared helper; no API or persistence changes.
Overview
Manage price alerts no longer collapses similar sub-dollar thresholds to the same rounded label (e.g. both showing
$0.0018). The list now passesmaximumFractionDigits: 15intoformatPriceWithSubscriptNotationso stored values like$0.00181069and$0.00182069stay distinguishable.formatPriceWithSubscriptNotationgains an optionalmaximumFractionDigitsoverride on the non-subscript path; default behavior elsewhere stays 2 decimals for ≥1 and 4 for <1. A regression test covers sub-cent threshold copy, and a small keypad doc example in create-alert was updated for extreme tiny prices.Reviewed by Cursor Bugbot for commit 3612636. Bugbot is set up for automated code reviews on this repo. Configure here.