chore: simplify the NumberTicker interface
Description
As the title, this addresses some discussions we had in #5345 about possible misuse of the props. This PR makes it harder to screw up the styles.
Test plan
No visual changes
https://github.com/valora-inc/wallet/assets/20150449/2b203175-13a2-4dc3-bbd5-e53923e82d5a
Related issues
- Fixes RET-1072
Backwards compatibility
Y
Network scalability
If a new NetworkId and/or Network are added in the future, the changes in this PR will:
- [x] Continue to work without code changes, OR trigger a compilation error (guaranteeing we find it when a new network is added)
Codecov Report
Attention: Patch coverage is 91.66667% with 1 lines in your changes are missing coverage. Please review.
Project coverage is 86.09%. Comparing base (
fbf9d4a) to head (3296779).
Additional details and impacted files
@@ Coverage Diff @@
## main #5369 +/- ##
==========================================
- Coverage 86.10% 86.09% -0.01%
==========================================
Files 737 737
Lines 30015 30016 +1
Branches 5141 5143 +2
==========================================
- Hits 25843 25841 -2
- Misses 3945 3948 +3
Partials 227 227
| Files | Coverage Δ | |
|---|---|---|
| src/points/PointsHome.tsx | 100.00% <ø> (ø) |
|
| src/components/NumberTicker.tsx | 96.96% <91.66%> (+0.09%) |
:arrow_up: |
... and 2 files with indirect coverage changes
Continue to review full report in Codecov by Sentry.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update fbf9d4a...3296779. Read the comment docs.
Like the idea of extracting the line height from the style!