-
Notifications
You must be signed in to change notification settings - Fork 80
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(swap): enable app fee via remote config #5359
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5359 +/- ##
==========================================
+ Coverage 85.90% 86.06% +0.15%
==========================================
Files 737 735 -2
Lines 30140 29967 -173
Branches 5165 5133 -32
==========================================
- Hits 25891 25790 -101
+ Misses 4017 3950 -67
+ Partials 232 227 -5
... and 23 files with indirect coverage changes 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.
LGTM!! i wondered if we want to hard code "valora" in variable names and translation keys / params for the fees? we've tried to be brand agnostic in the code so far so wanted to check that this was an intentional move (i was thinking that the readability wouldn't be affected if we omit the "valora" part)
It's intentional, but I see your point. |
### Description This PR allows enabling the swap fee via the remote config. When enabled, the free Valora swap fee line item is hidden. The details of the Valora fee are then displayed when hitting the info button of the exchange rate line item. ### Test plan - Updated tests | Valora fee disabled | Valora fee enabled (0 fee from API) | Valora fee enabled (positive fee from API) | |----------|----------|----------| | ![image](https://github.com/valora-inc/wallet/assets/57791/6cded654-86bd-46eb-ab8d-da35076588bd) | ![image](https://github.com/valora-inc/wallet/assets/57791/038fb3b4-d2cf-4d49-8325-40b6824038a8) | ![image](https://github.com/valora-inc/wallet/assets/57791/576fcf93-b99a-4269-a387-fa009e10dedb) | | ![image](https://github.com/valora-inc/wallet/assets/57791/37ac4758-4d25-46a7-852a-c6b21ea44047) | ![image](https://github.com/valora-inc/wallet/assets/57791/49cd7a09-775e-4b47-91b4-ecf0a022b4c6) | ![image](https://github.com/valora-inc/wallet/assets/57791/dd66d5d3-0bd3-4c89-a5cd-4b4b1c34d442) | Notes: - copies are not final - the "Valora fee disabled" case is same as today except it also shows the info icon next to the exchange rate. ### Related issues - Fixes RET-1061 ### 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
This PR allows enabling the swap fee via the remote config.
When enabled, the free Valora swap fee line item is hidden.
The details of the Valora fee are then displayed when hitting the info button of the exchange rate line item.
Test plan
Notes:
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: