-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(feed): include network icon in tx feed items #5148
Conversation
1 build increased size
Celo (test) 1.81.0 (146)
|
Item | Install Size Change |
---|---|
🗑 celo | ⬇️ -15.5 MB |
📝 valora | ⬆️ 1.6 MB |
📝 Lottie | ⬆️ 782.7 kB |
📝 Code Signature | ⬆️ 662.6 kB |
📝 Strings.CFStrings | ⬆️ 650.6 kB |
🛸 Powered by Emerge Tools
) ### Description Accepting network ids as an array would mean that the selector recomputes the result even if the same list of network ids are passed and returns a new result, resulting in unnecessary rerenders. This updates it so that the selector returns all network id's icons. An alternative approach would be to set `memoizeOptions` like `tokenIdsSelector`, but there doesn't seem to be any harm in returning all network's icon in the function. The consumer of this selector can pick the required networks' icon from the object ### Test plan CI, ensured the below warning doesn't show in #5148 when merged with this change <img src="https://github.com/valora-inc/wallet/assets/5062591/14ac3745-d92c-44a7-9a1a-4c93837eff2e" width="200"/> ### Related issues N/A ### Backwards compatibility Yes ### 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 ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5148 +/- ##
=======================================
Coverage 85.70% 85.70%
=======================================
Files 730 731 +1
Lines 29861 29877 +16
Branches 5156 5158 +2
=======================================
+ Hits 25592 25607 +15
- Misses 4034 4035 +1
Partials 235 235
Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎨 Looks great to me - tested on iOS and Android.
…lora-inc#5147) ### Description Accepting network ids as an array would mean that the selector recomputes the result even if the same list of network ids are passed and returns a new result, resulting in unnecessary rerenders. This updates it so that the selector returns all network id's icons. An alternative approach would be to set `memoizeOptions` like `tokenIdsSelector`, but there doesn't seem to be any harm in returning all network's icon in the function. The consumer of this selector can pick the required networks' icon from the object ### Test plan CI, ensured the below warning doesn't show in valora-inc#5148 when merged with this change <img src="https://github.com/valora-inc/wallet/assets/5062591/14ac3745-d92c-44a7-9a1a-4c93837eff2e" width="200"/> ### Related issues N/A ### Backwards compatibility Yes ### 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)
### Description Made a reusable component to create an icon with a badge and used for all icons in the tx feed ### Test plan Manually | Pending, send/receive | Nfts and swaps | |:--------:|:--------:| | <img src="https://github.com/valora-inc/wallet/assets/5062591/756a7902-3169-4371-875c-51dad8659425" width="250" /> | <img src="https://github.com/valora-inc/wallet/assets/5062591/5a5c1aae-9b9e-48bb-8fee-8be64843d941" width="250" /> | ### Related issues - Fixes ACT-105 ### Backwards compatibility Yes ### 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)
Description
Made a reusable component to create an icon with a badge and used for all icons in the tx feed
Test plan
Manually
Related issues
Backwards compatibility
Yes
Network scalability
If a new NetworkId and/or Network are added in the future, the changes in this PR will: