Skip to content

Commit

Permalink
Upgrade React Native to 0.71.6 (#6220)
Browse files Browse the repository at this point in the history
* bump react-native to 0.67.5

* react upgrade configs

* bump lottie-react-native

* bump react-native-aes-crypto

* bump react-native-minimizer

* bump react-dom

* migrate react-native patch

* remove old patch

* remove react-native patch for now. deal with that later on

* remove old lottie framework & viewpager

* patch react-native-aes-crypto

* fix submodule resolution

* update react-native-aes-crypto patch

* undo lottie manual link

* rn 68.6 upgrade

* update RCTBundleURLProvider

* update pods

* rn 69.8 upgrade

* update pods

* rn update 0.70.7

* use node 16

* update podfile

* update pods

* 71.4

* bump pods to 71.4

* use RN animated for now

* update sentry/react-native. fix sentry-cli

* hard code drawer dismiss

* disable svg metro bundler config to allow Bigint to number conversion

* Update static-logos svg's

* Update .nvmrc from Node 14 to 16

* Update Gemfile for RN 0.71.6

* Update deps and pods

- Bump RN to 0.71.6 and update pods
- Add @ethereumjs/util
- Bump metro-react-native-babel-preset
- Bump rn-nodeify
- Bump package.json node engine
- Update Yarn lockfile

* Add commented Babel config from debugging SVGs

* Add back react-native-svg Metro config

* Test all @ethereumjs/util methods and BigInt

* udpate android configs

* Revert "Test all @ethereumjs/util methods and BigInt"

This reverts commit ad58291.

* Revert "Add commented Babel config from debugging SVGs"

This reverts commit d8f7279.

* Convert reanimated v1 code -> v2 for ReusableModal and Drawer

* Replace Notification animation with reanimated v2

* Use SheetBottom for DetectedTokens screen

* Remove layout animations on accordion for now

* Update AppState listener removal

* Expose boolean in dismiss callback for ReusableModal and SheetBottom

* Remove AppState listeners and fix lint

* patch react-native TextInput

disable android keyboard learning feature

* Move Flipper files on Android

* Update build gradle files with manifest placeholders and remove need for multidex

* Clean up MainActivity and MainApplication java files

* Configure gesture handler for Android in react-native.config.js

* Patch compile method for packages

* Bump blur and video packages

* Find node with xcode.env

* Update pod files with bumped libraries

* patch(react-native): make sdk versioning absolute

* update pods

* react-native-aes-crypto-fork: apply manual patch

* dont kill adb server when running on android

* skip build react-native from source

* Bump react-native-reanimated from 3.0.2 to 3.1.0

* Bump pod RNReanimated from 3.0.2 to 3.1.0

* Add Hermes ProGuard rules for Android

https://reactnative.dev/docs/hermes#android

* Doc pos eth-json-rpc-errors issue RE Hermes

* Add temp debug breakpoints and crash notes

* removed lint and audit blockers to test bitrise builds

* added lint disabled on files

* removed non-existing imports

* Manually set Error stack property

* Revert manually adding lru-cache

Done earlier to resolve build error:

lru-cache not accessible from @babel/helper-compilation-targets

* snapshot

* patch hermes-build

* remove commented code

* Android: build only one ABI during development

* Use JS exports in wdio config files

* add react-native-aes-crypto-forked patch

* feat(CI): Bitrise M1 Machine and React Native 0.71.6 compatibility upgrade  (#6327)

* [FIX] Gas is not re-calculated when updating a transaction (#5876)

* check gas is recalculate on confirm screen

* reset the value of gas before estimating

* update snapshot

* init engine for failing keyringcontroller

* test init

* mock transactioncontroller

* update test

* rebased to main

* revert test file name to index

* fix failing test

* enable M1 builds on RN

* updated NDK version

* bump to new workflow step and NDK version

* log out NDK home after install

* [FEATURE][MC] - Edit account name view (#6165)

* Edit account name view

* addressed review

* navigate to edit account name

* edit header style

* E2e appium/715 edit account name view (#6303)

* Fix flaky test

* Solve Browserstack errors

* Added Gesture.waitAndTap method AddContact and Contacts

---------

Co-authored-by: SamuelSalas <[email protected]>

* Cleanup approve transaction review (#6213)

* Revert "ci: temporarily downgrade ubuntu to 20.04" (#5199)

This reverts commit 5542193.

* Fix duplicate test name lint warning (#6304)

The lint warning about a test title being repeated has been fixed. The
two tests were very similar; the titles have been updated to explain
how they are different.

---------

Co-authored-by: legobeat <[email protected]>
Co-authored-by: LeoTM <[email protected]>

* removed version print out step

* update bitrise step version

* updated ndk version

* added local prop file

* update build step and add local.properties file in android

* update local prop script

* bump ndk version in metamask gradle

* added strings to be translated for feature #6230 (#6308)

* bump ndk version

* add the NDK path to root gradle

* added hard code NDK version and path

* deps: force xml2js@>=0.5.0 via resolutions (#6240)

- CVE-2023-0842 / GHSA-776f-qx25-q3cc

* updated rootproject properties

* only update NDK version in patch

* only update NDK version

* removed local prop build step

* Revert "only update NDK version"

This reverts commit 2285dd3.

* Revert "Revert "only update NDK version""

This reverts commit 1cbfeb1.

* pull NDK path and bitrise script updates

* update filepath, script and gradle config to be more dynamic

* bump to max large M1

* update gradle to provide NDK path for bitrise

* more dynamic ndk path options

* update ndk path check

* added if check to function

* updated gradle for test

* updated gradle for test remove env check

* remove if check in react android patch

* updated ndkPath

* update build gradle

* remove ndk version

* remove ndk from gradle

* removed ndkVersion

* uncommented ndkVersion

* update file path name

* updated builds with name correction

* update version on install-missing-android-tools bitrise builds

* devDeps: Remove concat-cli (#6315)

Doesn't seem to ever have been useful.
Introduced in 69381f0

Prefer `cat`.

* Refactor SendTo - extract code to render from / to addresses into separate component (#6266)

* initial commit

* draft

* cleaned up

* lint

* include isBalanceZero for fromaddress

* fix snapshot

* resolved feedback

* renaming component names

* Update app/components/Views/SendFlow/AddressFrom/AddressFrom.test.tsx

Co-authored-by: Ariella Vu <[email protected]>

* Update app/components/Views/SendFlow/SendTo/index.js

Co-authored-by: Ariella Vu <[email protected]>

* removed redudant snapshot

* rebased to main

* snapshot update

* removed podfile change

---------

Co-authored-by: Ariella Vu <[email protected]>

* On-ramp: Add redux-thunk, refactor successful order handler (#6257)

* Fix missing handler on mandatory modal (#6309)

* feature(on-ramp): add development environment to onramp-sdk (#6325)

* On-ramp: fix missing network name (#6340)

* 6.5.0 (#6241)

* 6.5.0

* fix(on-ramp): Add thunk to handle buy crypto deeplink (#6248)

* [FIX] Detox: wallet-tests.spec.js (#6250)

* fix wallet-tests.spec.js

* add collectible json

* updated collectible data for bitrise wallet

* fix: invalid title error (#6280)

* Update Network Badge to use Badge component of component library (#6254)

* Show unsupported token for network when watching tokens (#6258)

* [FIX] - Upgrading with deprecated test network selected (#6269)

* add migrations to handle deprecated networks

* use enums, const instead of strings

---------

Co-authored-by: CW <[email protected]>

* [FIX]  Patch assets-controller to not use BigInt (#6305)

* Patch assets-controller to not use BigInt

* Update to use public link

Co-authored-by: sethkfman <[email protected]>

* Update to spell out React Native

Co-authored-by: legobeat <[email protected]>

* Update to spell out React Native

Co-authored-by: legobeat <[email protected]>

---------

Co-authored-by: sethkfman <[email protected]>
Co-authored-by: legobeat <[email protected]>

* build 1104 (#6310)

* update changelog

---------

Co-authored-by: metamaskbot <[email protected]>
Co-authored-by: Pedro Pablo Aste Kompen <[email protected]>
Co-authored-by: Chris Wilcox <[email protected]>
Co-authored-by: abretonc7s <[email protected]>
Co-authored-by: tommasini <[email protected]>
Co-authored-by: Cal Leung <[email protected]>
Co-authored-by: sethkfman <[email protected]>
Co-authored-by: legobeat <[email protected]>
Co-authored-by: sethkfman <[email protected]>

* New Crowdin translations by Github Action (#6208)

* New Crowdin translations by Github Action

* PR update

* Revert "PR update"

This reverts commit 39e533a.

---------

Co-authored-by: metamaskbot <[email protected]>
Co-authored-by: sethkfman <[email protected]>

* Stabilise E2e Android tests on pipeline (#6341)

* Modify actions bar function and small tidy ups

* Commit working Smoke tests

* Small changes to tests

* Small fixes

* hide Keyboard

* Fiz sendtoken browserStack

* fix sendToken and CreateWalletAccount

* add smoke tag to lockreset

* wait for no thanks button to exists

* increase wait time for term of use modal.

* fix wallet displayed step

* add time interval to waitFor on no thanks button

* add time interval for waitForDisplayed

* Add  check for terms of use modal loading delay

* Update common-steps.js

Alter CreateWalletTest to also wait for terms of use text

* Add double tap

* update tags

---------

Co-authored-by: Curtis <[email protected]>

* [DETOX] Only Run tests with the "smoke" tag in the describe block (#6338)

* add tags to test describe block.

* add regression tags to describe block

* create methods for Smoke & Regression

* update bitrise.yml

* fix lint

* update changelog

* Fix readme typos (#6275)

Co-authored-by: legobeat <[email protected]>

* sturdier check (#5866)

* sturdier check

* apply feedback

* apply feedback

* unit test

* check phishing and deeplinks

* feedback

* resolve

* url check

* more tests

---------

Co-authored-by: Curtis David <[email protected]>

* Appium/fix reports video failures (#6343)

* try/catch error generating reports

* clean up for reports

* Update SendToken.feature

* delete feature, was renamed

* [e2e] Send ETH to an EOA using Ganache network on Android (#6215)

* Send ETH with Ganache network

* Move Ganache initialization to common steps

* Remove unneeded async

* Update wdio/features/Confirmations/SendEthEOA.feature

Co-authored-by: Curtis David <[email protected]>

* Add extra step for closing new modal

* Add tag @confirmations

---------

Co-authored-by: Curtis David <[email protected]>

* Fix yarn watch clean (#6339)

* enable proguard for release and QA builds

---------

Co-authored-by: Sylva Elendu <[email protected]>
Co-authored-by: tommasini <[email protected]>
Co-authored-by: SamuelSalas <[email protected]>
Co-authored-by: Jyoti Puri <[email protected]>
Co-authored-by: legobeat <[email protected]>
Co-authored-by: Mark Stacey <[email protected]>
Co-authored-by: LeoTM <[email protected]>
Co-authored-by: Ariella Vu <[email protected]>
Co-authored-by: Pedro Pablo Aste Kompen <[email protected]>
Co-authored-by: Cal Leung <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: metamaskbot <[email protected]>
Co-authored-by: Chris Wilcox <[email protected]>
Co-authored-by: abretonc7s <[email protected]>
Co-authored-by: MetaMask Bot <[email protected]>
Co-authored-by: yande <[email protected]>
Co-authored-by: Curtis <[email protected]>
Co-authored-by: Brendan Kirby <[email protected]>
Co-authored-by: witmicko <[email protected]>
Co-authored-by: seaona <[email protected]>
Co-authored-by: Matthew Walsh <[email protected]>

* Update Podfile.lock

3 hashes updated after fresh branch checkout and setup

* Revert eth-rpc-errors+4.0.3.patch

Revert manually setting error stack property, no longer needed.

Addressed in Hermes (23/03/23):
facebook/hermes@f2f1a2e

Addressed in this PR/branch via custom Hermes build:
8a5dce5

Fresh build tested in MM mobile browser https://metamask.github.io/test-dapp successful Connect Action, no crash after modal, remains connected.

* native module for goBack on Android

* implement Minimizer Android native module

Android uses native implementation (GoBack class)
iOS uses 'react-native-minimizer' package

creates NativeModules file to populate with all used native modules

* add puppeteer to lavamoat allow-scrpits

* update yarn.lock

* allow jest to run

* update pods

* ignore default exports rule

* remove unused nativemodules import

* mock rnfetchblobk mkdir function

* remove caret from rn clipboard

* react-native-keychain version 8.0.0

* fix: hexToBN should not be used with BN argument

* fix: Upgrade testing library versions and resolve jest unit tests (#6425)

* Update snapshots

* Update test IDs

* Explicitly import waitFor for detox

* Add testEnvironment property to jest config

* Add mock for react-native-default-preference

* Stringify mock balance data

* Update Routes

* Fix broken unit tests. Add missing mocks.

* Update testing library and deps versions

* Patch react-native-button to be accessible by default

* Change GetStarted to use getByRole

* Change PaymentMethods to use getByRole

* Use getByRole in Regions tests

* Use getByRole in Wallet tests

* Use getByRole in TransactionReview tests

* Update snapshots

* Fix linting

* Fix snapshots

* Update snapshots

* Remove engine.init from tests

* Update yarn lock

* Remove non testing library upgrades

* Remove last non test library upgrades

* Undo bitrise chnages

* Remove buttonTestID from Box

* Remove true default on accessible prop for Box

* Fix lint issue

* Uncomment reaniamted jest test setup

* Update snapshots

* Fix failing tests

* remove .node-version in favor of .nvmrc

* [hexToBN] allow non string input values

handle non string arguments without throwing error to maintain
the same behavior as before.

centralize imports to make sure all use the same implementation

* fix lint

* remove proptype error log from device screen.

revert this commit once #6458
gets closed

* fix lint

* restore adb server reload when building

* remove unused flow config file

* fix yarn.lock

* fix unit tests

do not use fake timers

* enable project ext var enableHermes

* bring bitrise yaml closer to main

* fix AccountFromToInfoCard unit test by waiting for element query

* testing library: make use of screen export

* AccountFromToInfoCard: tests: remove unused import

* recover ndk_version key

* replace deprecated listener removal

* bitrise: download cmake manually with sdkmanager

* bitrise: fix android sourcemaps path

* Remove old project.ext.react

* Fix snapshots

* bump version

* Bump version and update ios build script to fix building main bundle and assets

* Remove @ethereumjs/util (from prev testing)

- was only added/tracked for direct testing
- not used directly in codebase
- resolve: #6220 (review)

[email protected]
└─┬ @metamask/[email protected]
  └─┬ @keystonehq/[email protected]
    ├─┬ @keystonehq/[email protected]
    │ └── @ethereumjs/[email protected]
    └─┬ @keystonehq/[email protected]
      └── @ethereumjs/[email protected] deduped

* Bump version

* Ignore GHSA-6w63-h3fj-q4vw advisory

* add get workflow info

* update release announce before task

* Update pod checksums

* bump version to 1125

* Fix lint issues

* Bump cocoapods from 1.12.0 to 1.12.1 in ReadMe

Follow-up: #6512

* Revert app/components/Views/Wallet/index.tsx textStyle changes

Resolve: https://github.com/MetaMask/metamask-mobile/pull/6220/files#r1222167831

Linting still passing locally, no related error/warning

* Fix Xcode 14.3.1 MixPanel Linker error

Bump IPHONEOS_DEPLOYMENT_TARGET from 8.0 to 11.0 (min. supported) in mixpanel-iphone Subproject

* Fix Xcode 14.3.1 Branch Linker error

Bump IPHONEOS_DEPLOYMENT_TARGET from 8.0 to 11.0 (min. supported) in branch-ios-sdk Subproject

* Fix Podfile to implement `flipper_config`

Pos fix: #6220 (review)

* Remove stale Podfile comment RE use_frameworks!

* Fix Podfile undefined local var flipper_config

Move to within definition so available within target scope

Resolve: #6220 (review)

* Update Podfile.lock

Note prev hash changes:
- boost
- DoubleConversion
- glog

* Update Xcode proj (doc) format from 12.0-compat to 14.0-compat

* native module go back on ios

* fix app minimize

* move RCTMinmizer inside NativeModules folder

* Revert "Fix Xcode 14.3.1 MixPanel Linker error"

This reverts commit 5c162a7.

* Revert "Fix Xcode 14.3.1 Branch Linker error"

This reverts commit 9d3d00d.

* fix android crash on SRP Reveal

* fix wc V2: remove big-integer polyfill

bigint support comes from hermes engine on Android

* NativeModules: ignore eslint default exports

as we will have more native modules exported from there

* return state on latest migration

* address yarn audit for fast-xml-parser

* removing the '#' as it was causing babel issues.

* Force bundle for iOS e2e debug

* Bump ruby

* Ignore all logbox errors

* remove smoke tag and flakiness step in 2 tests

* fix lint

* update snapshots

* fix jest unit tests

* remove duplicate testing-library reference

* update tests

* update jest snapshot

---------

Co-authored-by: LeoTM <[email protected]>
Co-authored-by: Cal Leung <[email protected]>
Co-authored-by: sethkfman <[email protected]>
Co-authored-by: sethkfman <[email protected]>
Co-authored-by: Sylva Elendu <[email protected]>
Co-authored-by: tommasini <[email protected]>
Co-authored-by: SamuelSalas <[email protected]>
Co-authored-by: Jyoti Puri <[email protected]>
Co-authored-by: legobeat <[email protected]>
Co-authored-by: Mark Stacey <[email protected]>
Co-authored-by: Ariella Vu <[email protected]>
Co-authored-by: Pedro Pablo Aste Kompen <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: metamaskbot <[email protected]>
Co-authored-by: Chris Wilcox <[email protected]>
Co-authored-by: abretonc7s <[email protected]>
Co-authored-by: MetaMask Bot <[email protected]>
Co-authored-by: yande <[email protected]>
Co-authored-by: Curtis <[email protected]>
Co-authored-by: Brendan Kirby <[email protected]>
Co-authored-by: witmicko <[email protected]>
Co-authored-by: seaona <[email protected]>
Co-authored-by: Matthew Walsh <[email protected]>
Co-authored-by: Tomás SANTOS <[email protected]>
  • Loading branch information
1 parent a2614bb commit 151b54e
Show file tree
Hide file tree
Showing 138 changed files with 9,980 additions and 20,010 deletions.
2 changes: 2 additions & 0 deletions .bundle/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BUNDLE_PATH: "vendor/bundle"
BUNDLE_FORCE_RUBY_PLATFORM: 1
65 changes: 0 additions & 65 deletions .flowconfig

This file was deleted.

26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The code is built using React-Native and running code locally requires a Mac or
- Install [cocoapods](https://guides.cocoapods.org/using/getting-started.html) by running:

```bash
sudo gem install cocoapods -v 1.12.0
sudo gem install cocoapods -v 1.12.1
```


Expand All @@ -50,7 +50,7 @@ sudo gem install cocoapods -v 1.12.0
- Select `SDK Tools` tab
- Check `Show Package Details` option below the tools list to show available versions
- Locate `NDK (Side-by-side)` option in the tools list
- Check NDK version `21.4.7075529`
- Check NDK version `21.4.7075529`
- Locate `CMake` option in the tools list
- Check CMake version `3.10.2`
- Click "Apply" or "OK" to download
Expand Down Expand Up @@ -216,19 +216,19 @@ On Bitrise CI, the wallet is created using the secret recovery phrase from secre
For local testing, the wallet is created using the secret recovery phrase from the `.e2e.env` file.

##### iOS
All tests live within the e2e/specs folder.
All tests live within the e2e/specs folder.

Prerequisites for running tests:
- Make sure to install `detox-cli` by referring to the instructions mentioned [here](https://wix.github.io/Detox/docs/introduction/getting-started/#detox-prerequisites).
- Additionally, install `applesimutils` by following the guidelines provided [here](https://github.com/wix/AppleSimulatorUtils).
- Make sure to install `detox-cli` by referring to the instructions mentioned [here](https://wix.github.io/Detox/docs/introduction/getting-started/#detox-prerequisites).
- Additionally, install `applesimutils` by following the guidelines provided [here](https://github.com/wix/AppleSimulatorUtils).
- Before running any tests, it's recommended to refer to the `iOS section` above and check the latest simulator device specified under `Install the correct simulator`.
- Make sure that Metro is running. Use this command to launch the metro server:

```bash
yarn watch
```

You can trigger the tests against a `release` or `debug` build. It recommended that you trigger the tests against a debug build.
You can trigger the tests against a `release` or `debug` build. It recommended that you trigger the tests against a debug build.

To trigger the tests on a debug build run this command:

Expand All @@ -247,33 +247,33 @@ If you have already built the application for Detox and want to run a specific t
```bash
yarn test:e2e:ios:debug:single e2e/specs/TEST_NAME.spec.js
```
To run tests associated with a certain tag, you can do so using the `--testNamePattern` flag. For example:
To run tests associated with a certain tag, you can do so using the `--testNamePattern` flag. For example:

```bash
yarn test:e2e:ios:debug --testNamePattern="Smoke"
```
This runs all tests that are tagged "Smoke"
This runs all tests that are tagged "Smoke"
##### Android
All android tests live within the wdio/feature folder.
All android tests live within the wdio/feature folder.

By default the tests use an avd named `Android 11 - Pixel 4a API 31`, with API `Level 30` (Android 11). You can modify the emulator and platform version by navigating to `wdio/config/android.config.debug.js` and adjusting the values of `deviceName` to match your emulator's name, and `platformVersion` to match your operating system's version. Make sure to verify that the config file accurately represents your emulator settings before executing any tests.

The sequence in which you should run tests:

create a test build using this command:
```bash
yarn start:android:qa
```bash
yarn start:android:qa
```

Then run tests using this command:
Then run tests using this command:

```bash
yarn test:wdio:android
```

If you want to run a specific test, you can include the `--spec` flag in the aforementioned command. For example:
```bash
yarn test:wdio:android --spec ./wdio/features/Onboarding/CreateNewWallet.feature
yarn test:wdio:android --spec ./wdio/features/Onboarding/CreateNewWallet.feature
```

### Changing dependencies
Expand Down
Loading

0 comments on commit 151b54e

Please sign in to comment.