Skip to content

Commit

Permalink
merge main and fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
tommasini committed Nov 15, 2024
2 parents e56bd3b + 22a4989 commit 0c3f46c
Show file tree
Hide file tree
Showing 2,677 changed files with 224,449 additions and 111,947 deletions.
13 changes: 13 additions & 0 deletions .android.env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
export MM_FOX_CODE="EXAMPLE_FOX_CODE"
export MM_BRANCH_KEY_TEST=
export MM_BRANCH_KEY_LIVE=
export METAMASK_BUILD_TYPE=
# Firebase
export FCM_CONFIG_API_KEY=
export FCM_CONFIG_AUTH_DOMAIN=
export FCM_CONFIG_PROJECT_ID=
export FCM_CONFIG_STORAGE_BUCKET=
export FCM_CONFIG_MESSAGING_SENDER_ID=
export FCM_CONFIG_APP_ID=
export GOOGLE_SERVICES_B64_ANDROID=
#Notifications Feature Announcements
export FEATURES_ANNOUNCEMENTS_ACCESS_TOKEN=
export FEATURES_ANNOUNCEMENTS_SPACE_ID=

12 changes: 5 additions & 7 deletions .depcheckrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
ignores:
- '@metamask/oss-attribution-generator'
- 'webpack-cli'
- '@react-native-community/datetimepicker'
- '@react-native-community/slider'
- 'patch-package'
- '@lavamoat/allow-scripts'
- 'babel-plugin-inline-import'
# This is used on the patch for TokenRatesController of Assets controllers, for we to be able to use the last version of it
- cockatiel

Expand Down Expand Up @@ -44,22 +49,17 @@ ignores:
- 'rn-nodeify'

## Unused devDependencies to investigate
- '@ethersproject/abi'
- '@metamask/swappable-obj-proxy'
- '@react-native-picker/picker'
- '@rnhooks/keyboard'
- '@segment/sovran-react-native'
- '@tradle/react-native-http'
- 'asyncstorage-down'
- 'buffer'
- 'd3-shape'
- 'dnode'
- 'eciesjs'
- 'eth-block-tracker'
- 'eth-json-rpc-infura'
- 'events'
- 'https-browserify'
- 'obs-store'
- 'path'
- 'pbkdf2'
- 'pify'
Expand All @@ -68,11 +68,9 @@ ignores:
- 'react-native-aes-crypto'
- 'react-native-aes-crypto-forked'
- 'react-native-crypto'
- 'react-native-flash-message'
- 'react-native-level-fs'
- 'react-native-os'
- 'react-native-randombytes'
- 'react-native-redash'
- 'react-native-swipe-gestures'
- 'react-native-tcp'
- 'socket.io-client'
Expand Down
41 changes: 17 additions & 24 deletions .detoxrc.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
/** @type {Detox.DetoxConfig} */
module.exports = {
artifacts: {
rootDir: "./artifacts/screenshots",
rootDir: "./artifacts",
plugins: {
screenshot: {
shouldTakeAutomaticSnapshots: true,
keepOnlyFailedTestsArtifacts: true,
takeWhen: {
testStart: false,
testDone: false,
}
},
},
video: {
enabled: true, // Enable video recording
keepOnlyFailedTestsArtifacts: true, // Keep only failed tests' videos
},
},
},

testRunner: {
args: {
$0: 'jest',
Expand All @@ -26,7 +31,7 @@ module.exports = {
configurations: {
'ios.sim.apiSpecs': {
device: 'ios.simulator',
app: 'ios.debug',
app: process.env.CI ? 'ios.qa' :'ios.debug',
testRunner: {
args: {
"$0": "node e2e/api-specs/run-api-spec-tests.js",
Expand All @@ -41,10 +46,9 @@ module.exports = {
device: 'ios.simulator',
app: 'ios.release',
},
// because e2e run on debug mode in bitrise
'android.emu.bitrise.debug': {
device: 'android.bitrise.emulator',
app: 'android.bitrise.debug',
'ios.sim.qa': {
device: 'ios.simulator',
app: 'ios.qa',
},

'android.emu.debug': {
Expand All @@ -64,7 +68,7 @@ module.exports = {
'ios.simulator': {
type: 'ios.simulator',
device: {
type: 'iPhone 13 Pro',
type: 'iPhone 15 Pro',
},
},
'android.bitrise.emulator': {
Expand All @@ -76,7 +80,7 @@ module.exports = {
'android.emulator': {
type: 'android.emulator',
device: {
avdName: 'Pixel_5_Pro_API_30',
avdName: 'Pixel_5_Pro_API_34',
},
},
},
Expand All @@ -86,32 +90,21 @@ module.exports = {
binaryPath: 'ios/build/Build/Products/Debug-iphonesimulator/MetaMask.app',
build: 'yarn start:ios:e2e',
},
'ios.release': {
'ios.qa': {
type: 'ios.app',
binaryPath:
'ios/build/Build/Products/Release-iphonesimulator/MetaMask.app',
build: "METAMASK_BUILD_TYPE='main' METAMASK_ENVIRONMENT='production' yarn build:ios:release:e2e",
},
'android.bitrise.debug': {
type: 'android.apk',
binaryPath: 'android/app/build/outputs/apk/prod/debug/app-prod-debug.apk',
build: 'yarn start:android:e2e',
'ios/build/Build/Products/Release-iphonesimulator/MetaMask-QA.app',
build: "METAMASK_BUILD_TYPE='main' METAMASK_ENVIRONMENT='qa' yarn build:ios:qa",
},
'android.debug': {
type: 'android.apk',
binaryPath: 'android/app/build/outputs/apk/prod/debug/app-prod-debug.apk',
build: 'yarn start:android:e2e',
},
'android.release': {
type: 'android.apk',
binaryPath:
'android/app/build/outputs/apk/prod/release/app-prod-release.apk',
build: "METAMASK_BUILD_TYPE='main' METAMASK_ENVIRONMENT='production' yarn build:android:release:e2e",
},
'android.qa': {
type: 'android.apk',
binaryPath: 'android/app/build/outputs/apk/qa/release/app-qa-release.apk',
build: "METAMASK_BUILD_TYPE='main' METAMASK_ENVIRONMENT='qa' yarn build:android:qa:e2e",
build: "METAMASK_BUILD_TYPE='main' METAMASK_ENVIRONMENT='qa' yarn build:android:qa",
},
},
};
2 changes: 1 addition & 1 deletion .e2e.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
export MM_TEST_ACCOUNT_SRP='word1 word... word12'
export MM_TEST_ACCOUNT_ADDRESS='0x...'
export MM_TEST_ACCOUNT_PRIVATE_KEY=''
export IS_TEST="true"
export IS_TEST="true"
43 changes: 35 additions & 8 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
// eslint-disable-next-line import/no-commonjs
module.exports = {
root: true,
parser: 'babel-eslint',
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
},
extends: [
// @react-native-community
// - Depends on babel-eslint parser
// - Migrated to @react-native/eslint-config after v3.2.0
'@react-native-community',
'@react-native',
'eslint:recommended',
// '@metamask/eslint-config', // TODO: Enable when ready
'plugin:import/warnings',
'plugin:react/recommended',
],
plugins: ['@metamask/design-tokens'],
plugins: ['@typescript-eslint', '@metamask/design-tokens'],
overrides: [
{
files: ['*.{ts,tsx}'],
extends: ['@metamask/eslint-config-typescript'],
rules: {
// TODO: re-enable
'jsdoc/no-types': 'off',
'react/display-name': 'off',
'react/no-unused-prop-types': 'off',
'react/prop-types': 'off',
'react/self-closing-comp': 'off',
// This change is included in `@metamask/[email protected]
'@typescript-eslint/no-unused-vars': [
'error',
Expand All @@ -30,6 +35,28 @@ module.exports = {
},
],
'@typescript-eslint/no-explicit-any': 'error',
// Under discussion
'@typescript-eslint/no-duplicate-enum-values': 'off',
},
},
{
files: ['*.js', '*.jsx'],
parser: '@babel/eslint-parser',
parserOptions: {
requireConfigFile: false,
babelOptions: {
presets: ['@babel/preset-env'],
},
},
rules: {
// under discussion
'no-unused-vars': 'off',
'react/no-unstable-nested-components': [
'warn',
{
allowAsProps: true,
},
],
},
},
{
Expand Down Expand Up @@ -109,7 +136,7 @@ module.exports = {
'import/no-mutable-exports': 2,
'import/no-namespace': 2,
'import/no-nodejs-modules': 2,
'import/prefer-default-export': 2,
'import/prefer-default-export': 0,
'no-alert': 2,
'no-constant-condition': [
2,
Expand Down Expand Up @@ -186,5 +213,5 @@ module.exports = {
radix: 0,
},

ignorePatterns: ['wdio.conf.js'],
ignorePatterns: ['wdio.conf.js', 'app/util/termsOfUse/termsOfUseContent.ts'],
};
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
57afe4ca921d85a51a923470239ca977fccbd1ae
# Standardize prettier configuration https://github.com/MetaMask/metamask-mobile/pull/4182
bdb7f37c90e4fc923881a07fca38d4e77c73a579
# Fix mixed tabs and spaces https://github.com/MetaMask/metamask-mobile/pull/1379
9f9a1121c6899e06d4aeef29017bb479df142adb
61 changes: 60 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@
* @MetaMask/mobile-devs

# Design System Team
app/component-library/ @MetaMask/design-system-engineers @MetaMask/mobile-platform
app/component-library/ @MetaMask/design-system-engineers

# Platform Team
patches/ @MetaMask/mobile-platform
app/core/Engine.ts @MetaMask/mobile-platform
app/core/Engine.test.js @MetaMask/mobile-platform
app/core/Analytics/ @MetaMask/mobile-platform
app/util/metrics/ @MetaMask/mobile-platform
app/components/hooks/useMetrics/ @MetaMask/mobile-platform

# Supply Chain Team
bitrise.yml @MetaMask/supply-chain @MetaMask/mobile-platform
Expand Down Expand Up @@ -60,3 +63,59 @@ patches/react-native+0.*.patch @MetaMask/supply-chain
# Snaps Team
**/snaps/** @MetaMask/snaps-devs
**/Snaps/** @MetaMask/snaps-devs

# Staking Team
app/components/UI/Stake @MetaMask/metamask-staking

# Assets Team
app/components/hooks/useIsOriginalNativeTokenSymbol @MetaMask/metamask-assets
app/components/hooks/useTokenBalancesController @MetaMask/metamask-assets
app/components/hooks/useTokenBalance.tsx @MetaMask/metamask-assets
app/components/hooks/useSafeChains.ts @MetaMask/metamask-assets
app/components/UI/AssetOverview @MetaMask/metamask-assets
app/components/UI/Collectibles @MetaMask/metamask-assets
app/components/UI/CollectibleContractElement @MetaMask/metamask-assets
app/components/UI/CollectivelContractInformation @MetaMask/metamask-assets
app/components/UI/CollectibleContractOverview @MetaMask/metamask-assets
app/components/UI/CollectibleContracts @MetaMask/metamask-assets
app/components/UI/CollectibleDetectionModal @MetaMask/metamask-assets
app/components/UI/CollectibleMedia @MetaMask/metamask-assets
app/components/UI/CollectibleModal @MetaMask/metamask-assets
app/components/UI/CollectibleOverview @MetaMask/metamask-assets
app/components/UI/ConfirmAddAsset @MetaMask/metamask-assets
app/components/UI/Tokens @MetaMask/metamask-assets
app/components/Views/AddAsset @MetaMask/metamask-assets
app/components/Views/Asset @MetaMask/metamask-assets
app/components/Views/AssetDetails @MetaMask/metamask-assets
app/components/Views/AssetHideConfirmation @MetaMask/metamask-assets
app/components/Views/AssetOptions @MetaMask/metamask-assets
app/components/Views/Collectible @MetaMask/metamask-assets
app/components/Views/CollectibleView @MetaMask/metamask-assets
app/components/Views/DetectedTokens @MetaMask/metamask-assets
app/components/Views/NFTAutoDetectionModal @MetaMask/metamask-assets
app/components/Views/NftDetails @MetaMask/metamask-assets
app/reducers/collectibles @MetaMask/metamask-assets

# UX Team
app/components/Views/AccountActions @MetaMask/wallet-ux
app/components/Views/AccountSelector @MetaMask/wallet-ux
app/components/Views/AddressQRCode @MetaMask/wallet-ux
app/components/Views/EditAccountName @MetaMask/wallet-ux
app/components/Views/LockScreen @MetaMask/wallet-ux
app/components/Views/Login @MetaMask/wallet-ux
app/components/Views/NetworkConnect @MetaMask/wallet-ux
app/components/Views/NetworkSelector @MetaMask/wallet-ux
app/components/Views/Onboarding @MetaMask/wallet-ux
app/components/Views/OnboardingCarousel @MetaMask/wallet-ux
app/components/Views/OnboardingSuccess @MetaMask/wallet-ux
app/components/Views/QRAccountDisplay @MetaMask/wallet-ux
app/components/Views/QRScanner @MetaMask/wallet-ux
app/components/Views/Settings @MetaMask/wallet-ux
app/components/Views/TermsAndConditions @MetaMask/wallet-ux

app/reducers/experimentalSettings @MetaMask/wallet-ux
app/reducers/modals @MetaMask/wallet-ux
app/reducers/navigation @MetaMask/wallet-ux
app/reducers/onboarding @MetaMask/wallet-ux
app/reducers/privacy @MetaMask/wallet-ux
app/reducers/settings @MetaMask/wallet-ux
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@ body:
label: Error messages or log output
description: Please copy and paste any relevant error messages or log output. This will be automatically formatted, so there is no need for backticks.
render: shell
- type: dropdown
id: stage
attributes:
label: Detection stage
description: At what stage was the bug detected?
options:
- In production (default)
- In beta
- During release testing
- On the development branch
validations:
required: true
- type: input
id: version
attributes:
Expand Down
6 changes: 4 additions & 2 deletions .github/guidelines/LABELING_GUIDELINES.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ It's essential to ensure that PRs have the appropriate labels before they are co
### Mandatory QA labels:
Every PR shall include one the QA labels below:
- **needs-qa**: If the PR includes a new features, complex testing steps, or large refactors, this label must be added to indicated PR requires a full manual QA prior being merged and added to a release.
- **No QA/E2E only**: If the PR does not require any manual QA effort, this label must be added. However, prior to merging, you must ensure end-to-end test runs in Bitrise are successful.

- **Spot check on release build**: If PR does not require feature QA but needs non-automated verification, this label must be added. Furthermore, when that label is added, you must provide test scenarios in the description section, as well as add screenshots, and or recordings of what was tested.

Once PR has been tested by QA (only if the PR was labeled with `needs-qa`):
To merge your PR one of the following QA labels are required:
- **QA Passed**: If the PR was labeled with `needs-qa`, this label must be added once QA has signed off
- **No QA Needed**: If the PR does not require any QA effort. This label should only be used in case you are updating a README or other files that does not impact the building or runtime of the application.
- **Run E2E Smoke**: This label will kick-off E2E testing and trigger a check to make sure the E2E tests pass.

### Optional labels:
- **regression-develop**: This label can manually be added to a bug report issue at the time of its creation if the bug is present on the development branch, i.e., `main`, but is not yet released in production.
Expand Down
Loading

0 comments on commit 0c3f46c

Please sign in to comment.