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

refactor: Update controller packages to v44 #6872

Merged
merged 8 commits into from
Aug 22, 2023

Conversation

Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Jul 24, 2023

Development & PR Process

  1. Follow MetaMask Mobile Coding Standards
  2. Add release-xx label to identify the PR slated for a upcoming release (will be used in release discussion)
  3. Add needs-dev-review label when work is completed
  4. Add needs-qa label when dev review is completed
  5. Add QA Passed label when QA has signed off

Description

Controller packages have been updated to roughly match the versions used in v44 of the core monorepo (this doesn't include the keyring controller, and a few packages are ahead of v44 already).

This update includes a significant breaking change: the migration of frequentRpcList in the PreferencesController to
networkConfigurations in the NetworkController. Various other packages have also been updated at the same time because they have a peer dependency upon the NetworkController.

Issue

Closes https://github.com/MetaMask/mobile-planning/issues/798

Checklist

  • There is a related GitHub issue
  • Tests are included if applicable
  • Any added code is fully documented

@socket-security
Copy link

socket-security bot commented Jul 24, 2023

Updated and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
@metamask/preferences-controller 2.1.0...3.0.0 None +0/-0 33 kB metamaskbot
@metamask/transaction-controller 4.0.0...4.0.1 None +1/-1 295 kB metamaskbot
@metamask/gas-fee-controller 4.0.0...4.0.1 None +1/-1 218 kB metamaskbot
@metamask/network-controller 5.0.0...6.0.0 None +0/-0 70.1 kB metamaskbot
@metamask/assets-controllers 5.0.0...5.0.1 None +2/-2 659 kB metamaskbot

🚮 Removed packages: swappable-obj-proxy@1.1.0

@socket-security
Copy link

socket-security bot commented Jul 24, 2023

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Gudahtt added a commit that referenced this pull request Jul 24, 2023
The `handleNetworkSwitch` helper function no longer requires the
`frequentRpcList` state as a parameter. Instead it takes a reference to
the `PreferencesController`, and gets the RPC list state from that.

Typically it would be preferrable to reference controller state from
Redux rather than accesing it directly from the Engine global. However,
this function will be called from non-UI contexts, so it has to get
controller state from global context regardless.

This change was done to simplify PR #6872, which is part of
MetaMask/mobile-planning#798
Gudahtt added a commit that referenced this pull request Jul 24, 2023
The `NetworkController` state property `provider` was still referenced
in a few unit tests, despite the fact that it no longer exists. All
such obsolete state references have been removed.

This change was done to simplify PR #6872, which is part of
MetaMask/mobile-planning#798
Gudahtt added a commit that referenced this pull request Jul 24, 2023
The `providerConfig` property of the `NetworkController` used to be
named `provider`, which was very easily confused with the `provider`
instance (and with various other things that we call "provider"). When
that renaming happened, not all local variables and function names were
updated accordingly.

All references to `providerConfig` now use the term "providerConfig".

This change was done to simplify PR #6872, which is part of
MetaMask/mobile-planning#798
Gudahtt added a commit that referenced this pull request Jul 24, 2023
The migration unit tests have been updated to group tests by the
migration number. One additional test case has been added as well, to
cover the case where the affected state doesn't exist.

This change was done to simplify PR #6872, which is part of
MetaMask/mobile-planning#798
@Gudahtt Gudahtt mentioned this pull request Jul 24, 2023
3 tasks
Gudahtt added a commit that referenced this pull request Jul 24, 2023
The `providerConfig` property of the `NetworkController` used to be
named `provider`, which was very easily confused with the `provider`
instance (and with various other things that we call "provider"). When
that renaming happened, not all local variables and function names were
updated accordingly.

All references to `providerConfig` now use the term "providerConfig".

This change was done to simplify PR #6872, which is part of
MetaMask/mobile-planning#798
@Gudahtt Gudahtt force-pushed the update-controller-packages-v44 branch from 6f9f65a to bf9b3ce Compare July 24, 2023 23:04
Gudahtt added a commit that referenced this pull request Jul 24, 2023
The `@metamask/controller-utils` package has been updated to v3.4. This
package had previously been held back because v3.1.0 introduced a usage
of the BigInt API, which was a compatibility issue. But that should no
longer be a problem now that React Native has been upgraded.

There were no breaking changes in this range of updates, but there were
a few additions and rearrangements that required substantial patch
updates.

This change was done to simplify PR #6872, which is part of
MetaMask/mobile-planning#798
@Gudahtt Gudahtt force-pushed the update-controller-packages-v44 branch from bf9b3ce to 542c899 Compare July 25, 2023 03:34
Gudahtt added a commit that referenced this pull request Jul 25, 2023
The `handleNetworkSwitch` helper function no longer requires the
`frequentRpcList` state as a parameter. Instead it takes a reference to
the `PreferencesController`, and gets the RPC list state from that.

Typically it would be preferrable to reference controller state from
Redux rather than accesing it directly from the Engine global. However,
this function will be called from non-UI contexts, so it has to get
controller state from global context regardless.

This change was done to simplify PR #6872, which is part of
MetaMask/mobile-planning#798
Gudahtt added a commit that referenced this pull request Jul 25, 2023
The `NetworkController` state property `provider` was still referenced
in a few unit tests, despite the fact that it no longer exists. All
such obsolete state references have been removed.

This change was done to simplify PR #6872, which is part of
MetaMask/mobile-planning#798
Gudahtt added a commit that referenced this pull request Jul 25, 2023
The `providerConfig` property of the `NetworkController` used to be
named `provider`, which was very easily confused with the `provider`
instance (and with various other things that we call "provider"). When
that renaming happened, not all local variables and function names were
updated accordingly.

All references to `providerConfig` now use the term "providerConfig".

This change was done to simplify PR #6872, which is part of
MetaMask/mobile-planning#798
Gudahtt added a commit that referenced this pull request Jul 25, 2023
The migration unit tests have been updated to group tests by the
migration number. One additional test case has been added as well, to
cover the case where the affected state doesn't exist.

This change was done to simplify PR #6872, which is part of
MetaMask/mobile-planning#798
Gudahtt added a commit that referenced this pull request Jul 25, 2023
The `@metamask/controller-utils` package has been updated to v3.4. This
package had previously been held back because v3.1.0 introduced a usage
of the BigInt API, which was a compatibility issue. But that should no
longer be a problem now that React Native has been upgraded.

There were no breaking changes in this range of updates, but there were
a few additions and rearrangements that required substantial patch
updates.

This change was done to simplify PR #6872, which is part of
MetaMask/mobile-planning#798
@Gudahtt Gudahtt force-pushed the update-controller-packages-v44 branch 2 times, most recently from 539ac27 to b7c0915 Compare July 25, 2023 13:13
@Gudahtt Gudahtt changed the title refactor: Update controller packages to v44 [WIP] refactor: Update controller packages to v44 Jul 25, 2023
@Gudahtt Gudahtt force-pushed the update-controller-packages-v44 branch from b7c0915 to 96970c4 Compare July 25, 2023 13:16
Gudahtt added a commit that referenced this pull request Jul 25, 2023
The `NetworkController` state property `provider` was still referenced
in a few unit tests, despite the fact that it no longer exists. All
such obsolete state references have been removed.

This change was done to simplify PR #6872, which is part of
MetaMask/mobile-planning#798
Gudahtt added a commit that referenced this pull request Jul 25, 2023
The `@metamask/controller-utils` package has been updated to v3.4. This
package had previously been held back because v3.1.0 introduced a usage
of the BigInt API, which was a compatibility issue. But that should no
longer be a problem now that React Native has been upgraded.

There were no breaking changes in this range of updates, but there were
a few additions and rearrangements that required substantial patch
updates.

This change was done to simplify PR #6872, which is part of
MetaMask/mobile-planning#798
Gudahtt added a commit that referenced this pull request Jul 25, 2023
The migration unit tests have been updated to group tests by the
migration number. One additional test case has been added as well, to
cover the case where the affected state doesn't exist.

This change was done to simplify PR #6872, which is part of
MetaMask/mobile-planning#798
Gudahtt added a commit that referenced this pull request Jul 25, 2023
The `providerConfig` property of the `NetworkController` used to be
named `provider`, which was very easily confused with the `provider`
instance (and with various other things that we call "provider"). When
that renaming happened, not all local variables and function names were
updated accordingly.

All references to `providerConfig` now use the term "providerConfig".

This change was done to simplify PR #6872, which is part of
MetaMask/mobile-planning#798
Gudahtt added a commit that referenced this pull request Jul 25, 2023
The `handleNetworkSwitch` helper function no longer requires the
`frequentRpcList` state as a parameter. Instead it takes a reference to
the `PreferencesController`, and gets the RPC list state from that.

Typically it would be preferrable to reference controller state from
Redux rather than accesing it directly from the Engine global. However,
this function will be called from non-UI contexts, so it has to get
controller state from global context regardless.

This change was done to simplify PR #6872, which is part of
MetaMask/mobile-planning#798
@Gudahtt Gudahtt force-pushed the update-controller-packages-v44 branch from 96970c4 to 9ae6873 Compare July 25, 2023 14:36
christopherferreira9 pushed a commit that referenced this pull request Aug 17, 2023
* Add native Android SDK dependency

* Add SDK event handlers

* Add ecies lib dependency

* Add SDK connect and accounts request logic in AndroidService

* Add request handling on AndroidService

* Add AndroidServicePort and update native module lib

* Remove logging

* AndroidService integration with SDKConnect

* feat: temp commit for metamask

* feat: working state

* feat: working android service

* feat: working sdk state

* feat: initialize binding from android service

* Always bind Android service when receiving bind deeplink

* Update native module

* Clean up logs

* Add native Android SDK dependency

* Add SDK event handlers

* Add ecies lib dependency

* Add SDK connect and accounts request logic in AndroidService

* Add request handling on AndroidService

* Add AndroidServicePort and update native module lib

* Remove logging

* AndroidService integration with SDKConnect

* feat: temp commit for metamask

* feat: working state

* feat: working android service

* feat: working sdk state

* feat: initialize binding from android service

* Always bind Android service when receiving bind deeplink

* Update native module

* Clean up logs

* refactor: Simplify `handleNetworkSwitch` helper (#6878)

The `handleNetworkSwitch` helper function no longer requires the
`frequentRpcList` state as a parameter. Instead it takes a reference to
the `PreferencesController`, and gets the RPC list state from that.

Typically it would be preferrable to reference controller state from
Redux rather than accesing it directly from the Engine global. However,
this function will be called from non-UI contexts, so it has to get
controller state from global context regardless.

This change was done to simplify PR #6872, which is part of
https://github.com/MetaMask/mobile-planning/issues/798

* refactor: Consistent provider config naming (#6880)

The `providerConfig` property of the `NetworkController` used to be
named `provider`, which was very easily confused with the `provider`
instance (and with various other things that we call "provider"). When
that renaming happened, not all local variables and function names were
updated accordingly.

All references to `providerConfig` now use the term "providerConfig".

This change was done to simplify PR #6872, which is part of
https://github.com/MetaMask/mobile-planning/issues/798

* ci(builds): Sentry sourcemap deploy (#6813)

* updated bitrise script and build sh to only ship sourcemaps on release to store builds

* update build_android_release step

* update build_android_release step

* feat: Create a performance E2E test for warm starts (#6865)

* Feature file create to test the warm start of the app. Updated Selectors from getElementByPlatform to getXpathElementByResourceId method

* Files Updated to run the Warm start feature on multiple devices

* Move single step from warm start performance to app launch times. Added foreground step to the Warm Start Performance feature

* Update Wallet screen wait method. Update the expected launch time to 8 seconds

* Update the cucumber tag to performance

* 7.3.1 (#6912)

* 7.3.0

* update provisioning profile for builds

* Hide approval flow loader if pending approval (#6767)

* fix: 7.3.0 - update terms of use metrics (#6761)

* fix: update cookie-tough dependency (#6772)

* adjust steps for UI changes (#6768)

* fix: update snapshot for linea mainnet (#6790)

* build 1144 (#6793)

* 7.3.1

* fix: invalid transaction data used for approve transaction (#6833) (#6914)

* use valid txn data when approving txn

* rename variable

Co-authored-by: Sylva Elendu <iamsylvaelendu@gmail.com>

* update changelog for release

---------

Co-authored-by: metamaskbot <metamaskbot@users.noreply.github.com>
Co-authored-by: sethkfman <Seth.Kaufman@consensys.net>
Co-authored-by: Matthew Walsh <matthew.walsh@consensys.net>
Co-authored-by: tommasini <46944231+tommasini@users.noreply.github.com>
Co-authored-by: Chris Wilcox <chris.wilcox@consensys.net>
Co-authored-by: sethkfman <10342624+sethkfman@users.noreply.github.com>
Co-authored-by: Sylva Elendu <iamsylvaelendu@gmail.com>

* docs: update PR template to include QA labels. (#6862)

* update PR template to include QA labels.

* update NO QA label description

* fix: #893 fix immediate lock timer (#6653)

* Stage saga changes

* Create action creators for authentication state machine

* Remove unused code

* Start and end state machine

* Clean up LockScreen

* Clean up LockManager

* Remove unused code

* Notify auth state machine from Authentication service

* Organize auth state machine in sagas

* Change sagas to TS

* Remove unused changes

* Add type to navigation in NavigationService

* Clean up sagas

* Remove console log

* Add tests for sagas

* Remove password set

* Fix saga lint issues

* Fix missing deps

* Remove ts ignore from sagas

* Clarify navigation action

* Remove commented logger

* Create LOCK_SCREEN route const

* Provide comments to sagas

* Rename biometrics listener

* set timer immediately v2

* Add biometricsStateMachineId to auth code

* Remove unused user actions

* Clean up LockManager logic to work with Android and iOS

* Better handle authentication sagas

* Fix saga export error

* Fix saga unit tests

* Bump version for test

* Refine logout state when using biometrics

* Bump version

* Remove retry logic for lock screen

* Cancel biometrics state machine when logging out

* Clean up lock screen

* Reset isAuthenticating when biometrics fail in SecureKeychain.js

* Move LockScreen to top nav level

* Persist app state when LockManager shows.

* Fix saga tests

* Move LockManager initialization

* Use existing login and logout actions for biometric state machine

* Bump versions

* Use replace when logging out

* Update LockScreen snapshoit

* Comment bioStateMachineId

* Remove LockManager to LockManagerService

* Add comments to Authentication service

* Convert LockManagerService to Typescript

* Fix typo

* Update LockManagerService visibility modifiers

* Fix lint issues

---------

Co-authored-by: tommasini <46944231+tommasini@users.noreply.github.com>
Co-authored-by: tommasini <tommasini15@gmail.com>

* 7.4.0 (#6806)

* 7.4.0

* updated format changelog

* fix: define ReactNativePayments podspec path in podfile (#6821)

* from address changing on transaction object (#6841)

* fix: invalid transaction data used for approve transaction (#6833) (#6842)

* use valid txn data when approving txn

* rename variable

Co-authored-by: Sylva Elendu <iamsylvaelendu@gmail.com>

* add check approval request exists before rejecting (#6838)

* build 1155 RC2 (#6861)

* fix(test): Permission Systems fix taping connect modals (#6868)

* fix tapping connect modals

* fixed lint issues

* removed unused function, not referenced anywhere

* chore: merge 7.3.1 cherry-pick (#6923)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore: version bump for 7.4.0 RC 3 (#6924)

* build 1159 RC4 (#6928)

---------

Co-authored-by: metamaskbot <metamaskbot@users.noreply.github.com>
Co-authored-by: sethkfman <Seth.Kaufman@consensys.net>
Co-authored-by: Pedro Pablo Aste Kompen <wachunei@gmail.com>
Co-authored-by: tommasini <46944231+tommasini@users.noreply.github.com>
Co-authored-by: sethkfman <10342624+sethkfman@users.noreply.github.com>
Co-authored-by: Sylva Elendu <iamsylvaelendu@gmail.com>
Co-authored-by: Vinicius Stevam <45455812+vinistevam@users.noreply.github.com>
Co-authored-by: Chris Wilcox <chris.wilcox@consensys.net>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore(deps): bump word-wrap from 1.2.3 to 1.2.4 (#6840)

Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](jonschlinkert/word-wrap@1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: sethkfman <10342624+sethkfman@users.noreply.github.com>
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>

* chore: remove unused Jest preprocessor (#6913)

The file `jest.preprocessor.js` has been unused since #6170.

* docs: Update QA section in PR template (#6930)

* fix: Remove splash animation wait step from Cold Start Launch time test script (#6931)

* Change wait for splash animation to expect to displayed assertion

* Remove splash animation steps

* feat: Translation (#6937)

* remove onBackdropPress for signatures (#6936)

* feat: Migrate wdio 'SendEthMultisig' test to Detox (#6934)

* feat: github action to check if PR has requested labels before being merged (#6794)

* feat(action): check if pr includes requested labels

* fix(template): adjust PR temaple

* fix(action): add missing QA label

* fix(action): check if no label prevents merging

* fix(action): remove QA label check

* fix(action): add missing reopened condition

* fix(action): increase list of labels which prevent merges

* fix(action): add labeling guidelines

* fix(action): typo

* fix(action): typo

* fix: update README.md (#6853)

* Restore deleted SendEthMultisig.feature file (#6956)

* fix: custom position logic for badgeWrapper (#6864)

* Fixed custom position logic for badgeWrapper

* Fixed lint error

* Added README to Avatar (#6895)

* Added README to Avatar

* Updated readme based on comments

* Fixed reference link for AvatarAccount

* style: Updated minor checkbox style (#6942)

* Updated minor checkbox changes

* Updated MultiSelect snapshot

* feat: add support for template and header on result pages (#6832)

* Fix: add missed parenheses in the function call (#6958)

* translation ens ipfs alert (#6966)

* chore: small refactor (#6963)

* small refacto

* fix(): fixed linter errors

* fix(): fixed linter errors

---------

Co-authored-by: sethkfman <10342624+sethkfman@users.noreply.github.com>

* feat: blockaid what's new popup (#6901)

* Add blockaid what's new

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* New image for both dark/light mode

* image should be first
fix podfile

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* What's new fix navigation

* Revert Podfile

* use Routes

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* revert podfile.lock

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* Show what's new only if blockaid is enabled in settings.

---------

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* feat: Add security alerts settings to experimental tab (#6779)

* Add security alerts settings to experimental tab

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* add more providers label

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* change styles label

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* Fix tests

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* Sort imports

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* use environment var to determine if to show blockaid or not

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* Removed Podfile changes

---------

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* fix: revert PR 6958 (#6975)

* fix: Fix TS errors in `component-library` directory (#6947)

* Fix snapshots

* Clean up hitSlop resolution

* Fix CellBase types reference error

---------

Co-authored-by: LeoTM <1881059+leotm@users.noreply.github.com>

* fix: remove translations files being pushed up to crowdin (#6910)

* ci(action): unused unit testing segmentation scripts and yarn steps (#6422)

* increase the number of operations per run to 200 in-order to clear out historical backlog

* remove broken out unit test yarn steps

* remove unused unit test segmentation script

* Revert "increase the number of operations per run to 200 in-order to clear out historical backlog"

This reverts commit 9287b74.

* fix: remove unused code to overwrite filenames for Sentry error reporting (#6945)

* remove unused code to overwrite filenames for Sentry error reporting

* updated with comments and removed console.log

* remove unused function that was initally implemented so extension could have a single bundle

* remove console.log

* fix: renamed sdk method

* chore: linting

* feat: avoid ios initialization

* Update native sdk dependency

* Remove console logs

* Clean up debug logs

* Migrate console logs to logger

* Format logging

* Remove AndroidServicePorts

* Clean up commemts

* Restructure event listeners

* fix: linting issue with async promise handler

* ci(code-cov): adding code-cov to project (#6789)

* added code cov action

* update ignore patterns for test coverage

* add codecov.yml file

* update invalid codecov.yml file

* added range and percision codecov.yml file

* updated excluded files

* add ci pass required

* bump threshold

* added carriage return to codecov config file

* updated global coverage

* remove codecov

* setup config and baseline

* update threshold

* Update .github/workflows/ci.yml

Co-authored-by: Mark Stacey <markjstacey@gmail.com>

* remove token due to public repo

* fix: #893 fix immediate lock timer (#6653)

* Stage saga changes

* Create action creators for authentication state machine

* Remove unused code

* Start and end state machine

* Clean up LockScreen

* Clean up LockManager

* Remove unused code

* Notify auth state machine from Authentication service

* Organize auth state machine in sagas

* Change sagas to TS

* Remove unused changes

* Add type to navigation in NavigationService

* Clean up sagas

* Remove console log

* Add tests for sagas

* Remove password set

* Fix saga lint issues

* Fix missing deps

* Remove ts ignore from sagas

* Clarify navigation action

* Remove commented logger

* Create LOCK_SCREEN route const

* Provide comments to sagas

* Rename biometrics listener

* set timer immediately v2

* Add biometricsStateMachineId to auth code

* Remove unused user actions

* Clean up LockManager logic to work with Android and iOS

* Better handle authentication sagas

* Fix saga export error

* Fix saga unit tests

* Bump version for test

* Refine logout state when using biometrics

* Bump version

* Remove retry logic for lock screen

* Cancel biometrics state machine when logging out

* Clean up lock screen

* Reset isAuthenticating when biometrics fail in SecureKeychain.js

* Move LockScreen to top nav level

* Persist app state when LockManager shows.

* Fix saga tests

* Move LockManager initialization

* Use existing login and logout actions for biometric state machine

* Bump versions

* Use replace when logging out

* Update LockScreen snapshoit

* Comment bioStateMachineId

* Remove LockManager to LockManagerService

* Add comments to Authentication service

* Convert LockManagerService to Typescript

* Fix typo

* Update LockManagerService visibility modifiers

* Fix lint issues

---------

Co-authored-by: tommasini <46944231+tommasini@users.noreply.github.com>
Co-authored-by: tommasini <tommasini15@gmail.com>

* 7.4.0 (#6806)

* 7.4.0

* updated format changelog

* fix: define ReactNativePayments podspec path in podfile (#6821)

* from address changing on transaction object (#6841)

* fix: invalid transaction data used for approve transaction (#6833) (#6842)

* use valid txn data when approving txn

* rename variable

Co-authored-by: Sylva Elendu <iamsylvaelendu@gmail.com>

* add check approval request exists before rejecting (#6838)

* build 1155 RC2 (#6861)

* fix(test): Permission Systems fix taping connect modals (#6868)

* fix tapping connect modals

* fixed lint issues

* removed unused function, not referenced anywhere

* chore: merge 7.3.1 cherry-pick (#6923)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore: version bump for 7.4.0 RC 3 (#6924)

* build 1159 RC4 (#6928)

---------

Co-authored-by: metamaskbot <metamaskbot@users.noreply.github.com>
Co-authored-by: sethkfman <Seth.Kaufman@consensys.net>
Co-authored-by: Pedro Pablo Aste Kompen <wachunei@gmail.com>
Co-authored-by: tommasini <46944231+tommasini@users.noreply.github.com>
Co-authored-by: sethkfman <10342624+sethkfman@users.noreply.github.com>
Co-authored-by: Sylva Elendu <iamsylvaelendu@gmail.com>
Co-authored-by: Vinicius Stevam <45455812+vinistevam@users.noreply.github.com>
Co-authored-by: Chris Wilcox <chris.wilcox@consensys.net>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore(deps): bump word-wrap from 1.2.3 to 1.2.4 (#6840)

Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](jonschlinkert/word-wrap@1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: sethkfman <10342624+sethkfman@users.noreply.github.com>
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>

* chore: remove unused Jest preprocessor (#6913)

The file `jest.preprocessor.js` has been unused since #6170.

* docs: Update QA section in PR template (#6930)

* fix: Remove splash animation wait step from Cold Start Launch time test script (#6931)

* Change wait for splash animation to expect to displayed assertion

* Remove splash animation steps

* feat: Translation (#6937)

* remove onBackdropPress for signatures (#6936)

* feat: Migrate wdio 'SendEthMultisig' test to Detox (#6934)

* feat: github action to check if PR has requested labels before being merged (#6794)

* feat(action): check if pr includes requested labels

* fix(template): adjust PR temaple

* fix(action): add missing QA label

* fix(action): check if no label prevents merging

* fix(action): remove QA label check

* fix(action): add missing reopened condition

* fix(action): increase list of labels which prevent merges

* fix(action): add labeling guidelines

* fix(action): typo

* fix(action): typo

* fix: update README.md (#6853)

* Restore deleted SendEthMultisig.feature file (#6956)

* fix: custom position logic for badgeWrapper (#6864)

* Fixed custom position logic for badgeWrapper

* Fixed lint error

* Added README to Avatar (#6895)

* Added README to Avatar

* Updated readme based on comments

* Fixed reference link for AvatarAccount

* style: Updated minor checkbox style (#6942)

* Updated minor checkbox changes

* Updated MultiSelect snapshot

* feat: add support for template and header on result pages (#6832)

* Fix: add missed parenheses in the function call (#6958)

* translation ens ipfs alert (#6966)

* chore: small refactor (#6963)

* small refacto

* fix(): fixed linter errors

* fix(): fixed linter errors

---------

Co-authored-by: sethkfman <10342624+sethkfman@users.noreply.github.com>

* feat: blockaid what's new popup (#6901)

* Add blockaid what's new

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* New image for both dark/light mode

* image should be first
fix podfile

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* What's new fix navigation

* Revert Podfile

* use Routes

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* revert podfile.lock

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* Show what's new only if blockaid is enabled in settings.

---------

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* feat: Add security alerts settings to experimental tab (#6779)

* Add security alerts settings to experimental tab

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* add more providers label

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* change styles label

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* Fix tests

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* Sort imports

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* use environment var to determine if to show blockaid or not

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* Removed Podfile changes

---------

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* updated jest config to have an allow list instead of eclude list for test coverage

* bumped thresholds

* added exclusions for mocks, util/test, util/testUtils

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
Co-authored-by: Cal Leung <cleun007@gmail.com>
Co-authored-by: tommasini <46944231+tommasini@users.noreply.github.com>
Co-authored-by: tommasini <tommasini15@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: metamaskbot <metamaskbot@users.noreply.github.com>
Co-authored-by: Pedro Pablo Aste Kompen <wachunei@gmail.com>
Co-authored-by: Sylva Elendu <iamsylvaelendu@gmail.com>
Co-authored-by: Vinicius Stevam <45455812+vinistevam@users.noreply.github.com>
Co-authored-by: Chris Wilcox <chris.wilcox@consensys.net>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
Co-authored-by: Gustavo Antunes <17601467+gantunesr@users.noreply.github.com>
Co-authored-by: SamuelSalas <samuel.salas.reyes@gmail.com>
Co-authored-by: sleepytanya <104780023+sleepytanya@users.noreply.github.com>
Co-authored-by: Gauthier Petetin <gauthierpetetin@hotmail.com>
Co-authored-by: Brian August Nguyen <brianacnguyen@gmail.com>
Co-authored-by: Menox <marcomenozzi80@gmail.com>
Co-authored-by: Olusegun Akintayo <trinisoftinc@gmail.com>

* fix: vault recovery & invalid password error (#6957)

* ResetPassword: remove unused redux action passwordUnset

* Authentication: set `state.user.passwordSet` boolean after successful auth

* Vault Recovery: reset engine initialization

set EngineService engineInitialized instance to false to ensure we
dispatch INIT_BG_STATE_KEY. This will save KeyringController state object
to be saved into redux store state

* EngineService: add unit tests

---------

Co-authored-by: Owen Craston <owengc12@gmail.com>
Co-authored-by: Cal Leung <cleun007@gmail.com>

* Use a release version of the native sdk

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>
Co-authored-by: abretonc7s <arthur.breton@consensys.net>
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
Co-authored-by: sethkfman <10342624+sethkfman@users.noreply.github.com>
Co-authored-by: SamuelSalas <samuel.salas.reyes@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: metamaskbot <metamaskbot@users.noreply.github.com>
Co-authored-by: sethkfman <Seth.Kaufman@consensys.net>
Co-authored-by: Matthew Walsh <matthew.walsh@consensys.net>
Co-authored-by: tommasini <46944231+tommasini@users.noreply.github.com>
Co-authored-by: Chris Wilcox <chris.wilcox@consensys.net>
Co-authored-by: Sylva Elendu <iamsylvaelendu@gmail.com>
Co-authored-by: Curtis David <Curtis.David7@gmail.com>
Co-authored-by: Cal Leung <cleun007@gmail.com>
Co-authored-by: tommasini <tommasini15@gmail.com>
Co-authored-by: Pedro Pablo Aste Kompen <wachunei@gmail.com>
Co-authored-by: Vinicius Stevam <45455812+vinistevam@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
Co-authored-by: Gustavo Antunes <17601467+gantunesr@users.noreply.github.com>
Co-authored-by: sleepytanya <104780023+sleepytanya@users.noreply.github.com>
Co-authored-by: Gauthier Petetin <gauthierpetetin@hotmail.com>
Co-authored-by: Brian August Nguyen <brianacnguyen@gmail.com>
Co-authored-by: Menox <marcomenozzi80@gmail.com>
Co-authored-by: Olusegun Akintayo <trinisoftinc@gmail.com>
Co-authored-by: LeoTM <1881059+leotm@users.noreply.github.com>
Co-authored-by: João Loureiro <1649425+jpcloureiro@users.noreply.github.com>
Co-authored-by: Owen Craston <owengc12@gmail.com>
@Gudahtt Gudahtt force-pushed the update-controller-packages-v44 branch from 7e7deec to 0489284 Compare August 18, 2023 13:17
@Gudahtt Gudahtt dismissed stale reviews from Cal-L and mcmire via 3736e24 August 18, 2023 13:22
@Gudahtt Gudahtt force-pushed the update-controller-packages-v44 branch from 0489284 to 3736e24 Compare August 18, 2023 13:22
@Gudahtt
Copy link
Member Author

Gudahtt commented Aug 18, 2023

Rebased to resolve conflicts

@codecov-commenter
Copy link

codecov-commenter commented Aug 18, 2023

Codecov Report

Merging #6872 (5450fac) into main (ddda0fd) will increase coverage by 0.04%.
Report is 7 commits behind head on main.
The diff coverage is 31.06%.

@@            Coverage Diff             @@
##             main    #6872      +/-   ##
==========================================
+ Coverage   32.64%   32.68%   +0.04%     
==========================================
  Files         994      994              
  Lines       26641    26654      +13     
  Branches     2088     2089       +1     
==========================================
+ Hits         8697     8713      +16     
+ Misses      17530    17527       -3     
  Partials      414      414              
Files Changed Coverage Δ
.../UI/ApproveTransactionReview/AddNickname/index.tsx 7.01% <ø> (ø)
...proveTransactionReview/ShowBlockExplorer/index.tsx 14.28% <ø> (ø)
...ew/VerifyContractDetails/VerifyContractDetails.tsx 44.44% <0.00%> (ø)
...pp/components/UI/ApproveTransactionReview/index.js 3.96% <0.00%> (ø)
app/components/UI/DrawerView/index.js 3.72% <0.00%> (ø)
app/components/UI/NetworkModal/index.tsx 4.54% <0.00%> (+0.10%) ⬆️
app/components/UI/Ramp/Views/OrderDetails.tsx 6.25% <0.00%> (ø)
app/components/UI/Ramp/components/OrderDetails.tsx 11.29% <0.00%> (ø)
app/components/UI/Swaps/QuotesView.js 2.38% <0.00%> (ø)
...components/UI/Swaps/components/TokenSelectModal.js 5.97% <0.00%> (ø)
... and 35 more

... and 4 files with indirect coverage changes

Copy link
Member

@cortisiko cortisiko left a comment

Choose a reason for hiding this comment

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

@Gudahtt I found a bug while testing.

When adding a custom network either by adding it through the popular networks flow, or manually adding a custom network, the network does not automatically switch from mainnet to the custom network by default.

To reproduce:
Import a wallet or create a wallet
Go to through the add custom network flow (tap on the network picker in the top nav on the wallet view > Add network > custom network tab)
Add a custom network using an RPC URL. Feel free to use gnosis: RPC URL:

Notice you do not switch from mainnet to the custom network: http://recordit.co/9De0nA7ocy

Reproducing via the custom network flow:
Import a wallet or create a wallet
Go to through the add custom network flow (tap on the network picker in the top nav on the wallet view > Add network > popular network tab)
Approve to add the network to your network list
When the network-added modal appears tap the switch to network
Notice you are not taken to the custom network

See here: http://recordit.co/v5iWMAR6GR

Expected behavior:
When adding a custom network manually the network should automatically switch from mainnet to the custom network by default.
http://recordit.co/pIbty7aWDG

Similarly, if you were to add a network via the popular networks flow, the network does not automatically update.

@cortisiko cortisiko added QA'd - Issues Found QA has been complete, however issues have been discovered that need to be addressed and removed needs-qa Any New Features that needs a full manual QA prior to being added to a release. labels Aug 21, 2023
@Gudahtt Gudahtt force-pushed the update-controller-packages-v44 branch from 5450fac to acf607e Compare August 22, 2023 16:18
Gudahtt and others added 8 commits August 22, 2023 14:04
Controller packages have been updated to roughly match the versions
used in v44 of the core monorepo (this doesn't include the keyring
controller, and a few packages are ahead of v44 already).

This update includes a significant breaking change: the migration of
`frequentRpcList` in the `PreferencesController` to
`networkConfigurations` in the `NetworkController`. Various other
packages have also been updated at the same time because they have a
peer dependency upon the `NetworkController`.

Closes MetaMask/mobile-planning#798
Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
The method `upsertNetworkController` has validation to ensure the chain
ID is a hex string. This was introduced here prematurely, before the
core packages were updated to use hex instead of decimal. This
validation has been removed with a patch, which we can then remove when
updating to the core v53 packages (which updates chain ID to be hex in
every package).
The network should switch automatically when adding a custom network
manually. This was broken because of an invalid option (`active` was
used instead of `setActive`).
@Gudahtt Gudahtt force-pushed the update-controller-packages-v44 branch from c1f50fe to 9a23657 Compare August 22, 2023 16:35
@sonarcloud
Copy link

sonarcloud bot commented Aug 22, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 8 Code Smells

34.8% 34.8% Coverage
2.2% 2.2% Duplication

warning The version of Java (11.0.20) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

@Gudahtt
Copy link
Member Author

Gudahtt commented Aug 22, 2023

The reported bug should hopefully be fixed! Though I haven't validated that yet.

Updated Bitrise e2e smoke test run: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/27637e9f-c16d-4d77-b6ff-b3e8ca57d3a6

Bitrise browserstack test run: https://app.bitrise.io/build/fad7d051-9bb5-4eb9-bf9f-a407cdfed4da

Both passing

@cortisiko cortisiko added QA Passed A successful QA run through has been done and removed QA'd - Issues Found QA has been complete, however issues have been discovered that need to be addressed labels Aug 22, 2023
Copy link
Member

@cortisiko cortisiko left a comment

Choose a reason for hiding this comment

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

Fix looks good! Nothing else to report 🌮

@Gudahtt Gudahtt merged commit c08760f into main Aug 22, 2023
13 checks passed
@Gudahtt Gudahtt deleted the update-controller-packages-v44 branch August 22, 2023 18:41
@github-actions github-actions bot locked and limited conversation to collaborators Aug 22, 2023
@metamaskbot metamaskbot added the release-7.7.0 Issue or pull request that will be included in release 7.7.0 label Aug 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
QA Passed A successful QA run through has been done release-7.7.0 Issue or pull request that will be included in release 7.7.0 team-mobile-platform team-wallet-framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants