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

Improve CELO Cash In experience #5425

Closed
jeanregisser opened this issue Oct 19, 2020 · 4 comments
Closed

Improve CELO Cash In experience #5425

jeanregisser opened this issue Oct 19, 2020 · 4 comments

Comments

@jeanregisser
Copy link
Contributor

jeanregisser commented Oct 19, 2020

What's important about this?

Users cashing in with CELO have been confused as they do not receive a notification or see their cUSD balance update. This epic improves the experience of cashing in with CELO.

Definition of done

Users receive notifications when they receive CELO, and CELO balance is listed in drawer when it is greater than zero.

@annakaz
Copy link
Contributor

annakaz commented Oct 20, 2020

CP-DOTO changes moved to #5444

@annakaz annakaz changed the title Cash In/Out - Surface Exchanges Improved CELO experience supporting Cash In with exchanges Oct 20, 2020
@annakaz annakaz changed the title Improved CELO experience supporting Cash In with exchanges Improved CELO Cash In experience Oct 20, 2020
@annakaz annakaz changed the title Improved CELO Cash In experience Improve CELO Cash In experience Oct 20, 2020
@jeanregisser
Copy link
Contributor Author

Taking this given, I've done part of this for PH changes in #5444

mergify bot pushed a commit that referenced this issue Oct 29, 2020
…O is restricted (#5613)

### 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](https://www.figma.com/file/zt7aTQ5wuXycIwxq5oAmF9/Wallet--Refresh?node-id=3136%3A0) (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**

<Img src="https://user-images.githubusercontent.com/57791/97578835-a3273300-19f1-11eb-99c9-008eead7097c.png" width="50%" /><Img src="https://user-images.githubusercontent.com/57791/97578944-c5b94c00-19f1-11eb-98c0-03b5d694c076.png" width="50%" />

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

<Img src="https://user-images.githubusercontent.com/57791/97579296-2ba5d380-19f2-11eb-8dea-07a5638f4998.png" width="50%" /><Img src="https://user-images.githubusercontent.com/57791/97579208-129d2280-19f2-11eb-8ac2-cfb898db5c4d.png" width="50%" />

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

<Img src="https://user-images.githubusercontent.com/57791/97579821-d1594280-19f2-11eb-9131-8ba3cbb66c51.png" width="50%" /><Img src="https://user-images.githubusercontent.com/57791/97579855-dae2aa80-19f2-11eb-9afb-5df628b4e568.png" width="50%" />


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

<Img src="https://user-images.githubusercontent.com/57791/97579912-ef26a780-19f2-11eb-8046-41cdd582ffd8.png" width="50%" /><Img src="https://user-images.githubusercontent.com/57791/97579887-e504a900-19f2-11eb-8429-78fdad044673.png" width="50%" />

### Related issues

- Fixes #5444 
- Addresses part of #5425 (Adds CELO balance to the menu)

### Backwards compatibility

Yes
@jeanregisser
Copy link
Contributor Author

jeanregisser commented Oct 29, 2020

Push notification issue is when the TX is a native CELO TX which doesn't call the ERC20 smart contract.

See discussion in https://celo-org.slack.com/archives/C01A2839V7G/p1603990253003300

@annakaz
Copy link
Contributor

annakaz commented Dec 11, 2020

Depends on celo-org/blockscout#172

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants