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

chore: sync with valora #70

Closed
wants to merge 14 commits into from
Closed

chore: sync with valora #70

wants to merge 14 commits into from

Conversation

bakoushin
Copy link

@bakoushin bakoushin commented Feb 7, 2025

Conflicts resolved

CONFLICT (rename/rename): mocks/react-native-fs.ts renamed to packages/@divvi/mobile/mocks/react-native-fs.ts in HEAD and to mocks/@divvi/react-native-fs.ts in upstream/main.
CONFLICT (rename/rename): mocks/react-native-keychain.ts renamed to packages/@divvi/mobile/mocks/react-native-keychain.ts in HEAD and to mocks/@interaxyz/react-native-keychain.ts in upstream/main.
CONFLICT (content): Merge conflict in package.json
CONFLICT (content): Merge conflict in packages/@divvi/mobile/src/firebase/remoteConfigValuesDefaults.ts
CONFLICT (file location): src/navigator/DemoModeAuthBlock.test.tsx added in upstream/main inside a directory that was renamed in HEAD, suggesting it should perhaps be moved to packages/@divvi/mobile/src/navigator/DemoModeAuthBlock.test.tsx.
CONFLICT (file location): src/navigator/DemoModeAuthBlock.tsx added in upstream/main inside a directory that was renamed in HEAD, suggesting it should perhaps be moved to packages/@divvi/mobile/src/navigator/DemoModeAuthBlock.tsx.
CONFLICT (rename/delete): src/pincode/pin-blocklist-hibpv7-top-25k-with-keyboard-translations.json renamed to packages/@divvi/mobile/src/pincode/pin-blocklist-hibpv7-top-25k-with-keyboard-translations.json in HEAD, but deleted in upstream/main.
CONFLICT (modify/delete): packages/@divvi/mobile/src/pincode/pin-blocklist-hibpv7-top-25k-with-keyboard-translations.json deleted in upstream/main and modified in HEAD. Version HEAD of packages/@divvi/mobile/src/pincode/pin-blocklist-hibpv7-top-25k-with-keyboard-translations.json left in tree.
CONFLICT (modify/delete): src/firebase/remoteConfigValuesDefaults.e2e.ts deleted in HEAD and modified in upstream/main. Version upstream/main of src/firebase/remoteConfigValuesDefaults.e2e.ts left in tree.
CONFLICT (content): Merge conflict in yarn.lock

Additional notes

Manually updated dependency changes:

  • package.json
  • yarn.lock
  • packages/@divvi/mobile/package.json

kathaypacific and others added 13 commits February 4, 2025 09:12
…nc#6469)

### Description

Unfortunately not all flows that access the private key go through the
same functions, so this PR adds a new blocking bottom sheet that is a
screen and navigates to it from:
1. `ensurePincode` - this is used from the flows that launch CAB / reset
pin / view recovery phrase
2. `sendPreparedTransaction` - this is used from all the transaction
flows, except for walletconnect
3. walletconnect saga, where we display the action request.

There is often UI that awaits the outcome of the transaction send flows
(spinners, navigation etc.) so I am returning the same result as if a
user dismissed the pincode screen during the flow.

### Test plan

Tested all flows to ensure the bottom sheet is correctly triggered, and
no extra errors are displayed.


https://github.com/user-attachments/assets/f376d1a7-a62c-43fa-b8a3-c598f81711d8



https://github.com/user-attachments/assets/eb817506-1cc1-4a8f-91c0-f9f3560e1455



https://github.com/user-attachments/assets/7bcdf0ee-00d9-465c-89c7-41f613669440



https://github.com/user-attachments/assets/5fbedfcd-7e2d-4b00-b61f-cec38788eb75



https://github.com/user-attachments/assets/55d26718-fa74-4406-a02f-257fdbc293c9


### Related issues

- Fixes RET-1304

### Backwards compatibility

Y

### Network scalability

If a new NetworkId and/or Network are added in the future, the changes
in this PR will:

- [ ] Continue to work without code changes, OR trigger a compilation
error (guaranteeing we find it when a new network is added)
…` fork (valora-inc#6470)

### Description

Migrate `react-native-keychain` to the `@interaxyz` fork in order to get
rid of the patch.

The patch changes are implemented in the fork:

oblador/react-native-keychain@master...mobilestack-xyz:react-native-keychain:intera-fork

Since the current version (8.2.0) is outdated, it was also upgraded to
the latest one (9.2.2), which required some refactoring.

### Test plan

* CI
* Manually tested on iOS device 
* Manually tested on an Android emulator

Manual test plan:
* Start existing wallet after upgrade
* Display recovery phrase
* Sign transaction
* Restore wallet using a recovery phrase
* Display recovery phrase

The library migrates the secrets storage in Android from
`SharedPreferences` to `DataStore` in [version
9.2.0](https://github.com/oblador/react-native-keychain/releases/tag/v9.2.0).
While the migration is expected to be seamless, perhaps we should do as
much manual testing on devices as we can to ensure there is no major
issue.
### Related issues

- Related to RET-1308

### Backwards compatibility

Y

### Network scalability

NA
…y configs (valora-inc#6473)

### Description

This PR removes some unused remote config configs, and replaces the
following with statsig:
- wallet connect v2 enabled -> feature gate (note that feature gates
always default to false, but we should default this value to true since
then builders can access wallet connect without a statsig account,
[context](https://valora-app.slack.com/archives/C025V1D6F3J/p1722383273562829))
- celo education url -> new item in app_config links

Note that the expanded pincode blocklist remote config flag doesn't
actually exist in the remote config console - so it is always defaulting
to false, so i've just removed the functionality.

Removed unused config:
- logPhoneNumberTypeEnabled
- pincodeUseExpandedBlocklist
- coinbasePayEnabled
- maxSwapSlippagePercentage
- networkTimeoutSeconds

### Test plan

n/a

### Related issues

- Related to RET-1272

### Backwards compatibility

Y

### Network scalability

If a new NetworkId and/or Network are added in the future, the changes
in this PR will:

- [ ] Continue to work without code changes, OR trigger a compilation
error (guaranteeing we find it when a new network is added)
)

### Description

Migrate `react-native-fs` to the `@divvi` fork in order to get rid of
the patch.

The patch changes are implemented in the fork:

itinance/react-native-fs@master...divvixyz:react-native-fs:master

### Additional notes

This library is not maintained anymore, so we have to migrate to another
one.

Possible alternatives (to consider in the future, as they aren't a
drop-in replacement):

*
[expo-file-system](https://docs.expo.dev/versions/latest/sdk/filesystem/)
(requires adding expo, which looks [cumbersome for a bare RN
project](https://docs.expo.dev/bare/installing-expo-modules/))
*
[@dr.pogodin/react-native-fs](https://dr.pogodin.studio/docs/react-native-file-system)(fork
of the original library, the docs are saying it is a drop-in
replacement, but it doesn't work that way)

### Test plan

* CI
* Next release App Store submission (patch is adding the
`PrivacyInfo.xcprivacy` file)

### Related issues

- Related to RET-1308

### Backwards compatibility

Y

### Network scalability

NA
### Description

This PR moves the following remote config variables to statsig dynamic
config:
- dapp list url -> app config
- dapp in-app webview enabled -> dapps webview config
- celo news -> app config
- swap price impact warning threshold -> swap config
- `maxNumRecentDapps` is no longer used and just removed here

### Test plan

n/a

### Related issues

- Related to RET-1272

### Backwards compatibility

Y

### Network scalability

If a new NetworkId and/or Network are added in the future, the changes
in this PR will:

- [ ] Continue to work without code changes, OR trigger a compilation
error (guaranteeing we find it when a new network is added)
### Description
Wrong translation was used on the SendConfirmation screen.

### Test plan
<img
src="https://github.com/user-attachments/assets/d3446e34-964b-4fa1-b82e-8011a2e7f6aa"
width="400" />

### 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

To be similar with other usages

### Test plan

| Before | After |
|--------|--------|
| <img
src="https://github.com/user-attachments/assets/76fa2a6f-44c6-41d3-ae07-56addbeb4ea9"
width="250" /> | <img
src="https://github.com/user-attachments/assets/b39e1ea1-92f8-4ac0-93d3-92a7d8e3d17f"
width="250" /> |

### Related issues

N/A
### Description

This PR removes remote config for:
- allowOtaTranslations - this should be configured via the app config,
it seems unnecessary to remotely configure it given that it is a mature
feature now and unlikely needs to be switched off dynamically (an
equivalent action is to simply stop pushing OTA translations)
- sentryTracesSampleRate - we've never needed to change this value
- sentryNetworkErrors - we've never needed to change this value

Removing dynamic config for these allows us to simplify the
interdependencies of core dependencies, and the app init saga can work
more reliably.

### Test plan

n/a

### Related issues

- Related to RET-1272

### Backwards compatibility

Y

### Network scalability

If a new NetworkId and/or Network are added in the future, the changes
in this PR will:

- [ ] Continue to work without code changes, OR trigger a compilation
error (guaranteeing we find it when a new network is added)
…es` (valora-inc#6482)

### Description

Migrate `@react-native-cookies/cookies` to `@divvi/cookies`

The patch changes are implemented in the fork:

react-native-cookies/cookies@master...divvixyz:cookies:master

Although we are not using it directly, it is a [peer
dependency](https://github.com/fiatconnect/fiatconnect-sdk/blob/065ba70bd5dde23fa186d161072eb024e0cde40d/package.json#L56)
for `fiatconnect-sdk` (this package is already
[updated](fiatconnect/fiatconnect-sdk#330)).

### TODO

Migrate back to the original package once
react-native-cookies/cookies#189 is merged.

### Test plan

* CI
* Next release App Store submission (patch is adding the
`PrivacyInfo.xcprivacy` file)

### Related issues

- Related to RET-1308

### Backwards compatibility

Y

### Network scalability

NA
@bakoushin bakoushin changed the title Alex/valora sync chore: sync with valora Feb 7, 2025
@bakoushin
Copy link
Author

Closing in favor of #73

@bakoushin bakoushin closed this Feb 10, 2025
@bakoushin bakoushin deleted the alex/valora-sync branch February 10, 2025 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants