Skip to content
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

[Wallet] Country feature flags and changes for countries where CP-DOTO is restricted #5613

Merged
merged 14 commits into from
Oct 29, 2020

Conversation

jeanregisser
Copy link
Contributor

@jeanregisser jeanregisser commented Oct 28, 2020

Description

This PR covers the following changes:

  • adds country specific feature flags, based on the country of the entered phone number. Flags are defined in src/flags.ts, helpers are in src/utils/countryFeatures.ts (there's a useCountryFeatures hook for easy usage within components).
  • adds the CELO balance to the menu, (hidden if amount is <= 0.001)
  • hides the CELO Buy/Sell buttons on the Exchange screen for CP-DOTO restricted countries (only PH for now). In that case we display a "Withdraw" button if the user has any CELO funds.

See designs on Figma (not entirely up-to-date with latest discussions):

Other changes

  • Upgrade react-native-reanimated to fix issue with mock during jest tests
  • Add tests for previously uncovered components:
    • DrawerNavigator
    • ExchangeHomeScreen

Tested

Menu (PH, CP-DOTO restricted) with/without CELO balance

Exchange Home screen (PH, CP-DOTO restricted) with/without CELO balance

Menu (US, non CP-DOTO restricted) with/without CELO balance

Exchange Home screen (non CP-DOTO restricted) with/without CELO balance

Related issues

Backwards compatibility

Yes

@jeanregisser jeanregisser marked this pull request as ready for review October 29, 2020 13:43
@jeanregisser jeanregisser requested a review from a team October 29, 2020 14:08
Copy link
Contributor

@gnardini gnardini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job with the test suite improvements! 👏

@jeanregisser jeanregisser added the automerge Have PR merge automatically when checks pass label Oct 29, 2020
@mergify mergify bot merged commit 1832aea into master Oct 29, 2020
@mergify mergify bot deleted the jeanregisser/country-feature-flags branch October 29, 2020 15:01
@Lss-Ankit
Copy link

Hi @jeanregisser Verified task using latest Test flight build v1.4.0 (28) and Android play store (internal build) v1.4.0 (1004294317)
Devices Used: Google Pixel Xl (8.1) , iPhone XR (13.2.2)

  1. Country Flag shown besides Phone number:
  • Verified country flags are shown beside phone number from menu based on entered phone number and selected country while sign up.
    Note: We have verified task with taking below countries phone number can you please let us know if we need to cover other countries as well.
    Covered Country Name: Nigeria, Colombia, UK, Germany, Netherlands, Ukraine, USA, Japan.
  1. CELO Balance on MENU:
  • Verified CELO balance is shown on Menu when user has > .001 CELO amount.
  • Verified CELO balance is removed on Menu when user has spend all CELO amount or user has < 0.001 CELO amount.
  • Verified cUSD and CELO balance is updated from menu when user sell/Buy CELO.
  • Verified CELO balance is updated when Withdraw CELO to other user.
  1. PH country:
  • Verified Buy/Sell and Withdraw CELO buttons are not shown when user having 0 CELO amount.
  • Verified CELO balance is shown on from menu along with CELO option when user has CELO balance.
  • Verified PH user is able to withdraw CELO to other from CELO exchange page by tapping on Withdraw CELO button if they have CELO amount.

Need Clarification:

  1. CELO balance is not shown on menu when user has 0.00097 CELO amount,
    Note:
  • In app it is shown 0.001 CELO amount in CELO exchange page but CELO balance on Menu not shown
  • We have account checked balance on https://explorer.celo.org/ and it shown 0.00097, can you please let us know is it expected behavior or we need to file a bug for the same?
  1. In Figma screen, for PH country CELO tab is totally removed from menu where as we are able to see CELO tab even user don't have balance. Can you please confirm is it expected or not?

Also, let us know if we need to verify any thing else in this task?

@jeanregisser
Copy link
Contributor Author

This is all expected thanks.
Note that the Figma file might not always reflect what we want now due to updates as we implement things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Have PR merge automatically when checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Local feature flags and Philippines-specific preparation
3 participants