Skip to content

Commit

Permalink
Merge branch 'main' into fix/add-icon-link
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherferreira9 authored Nov 28, 2024
2 parents 7c46a08 + 2327799 commit 1ea6045
Show file tree
Hide file tree
Showing 2,118 changed files with 162,856 additions and 87,681 deletions.
2 changes: 1 addition & 1 deletion .android.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ 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=
export GOOGLE_SERVICES_B64_ANDROID=
#Notifications Feature Announcements
export FEATURES_ANNOUNCEMENTS_ACCESS_TOKEN=
export FEATURES_ANNOUNCEMENTS_SPACE_ID=
Expand Down
10 changes: 3 additions & 7 deletions .depcheckrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ ignores:
- '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 @@ -46,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 @@ -70,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
37 changes: 15 additions & 22 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 Down Expand Up @@ -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",
},
},
};
64 changes: 57 additions & 7 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
// 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}'],
Expand All @@ -34,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 All @@ -50,6 +73,33 @@ module.exports = {
'@metamask/design-tokens/color-no-hex': 'off',
},
},
{
files: [
'app/components/UI/Name/**/*.{js,ts,tsx}',
'app/components/hooks/DisplayName/**/*.{js,ts,tsx}'
],
rules: {
'no-restricted-syntax': [
'error',
{
selector: `ImportSpecifier[imported.name=/${[
'selectChainId',
'selectNetworkClientId',
'selectNetworkStatus',
'selectNickname',
'selectProviderConfig',
'selectProviderType',
'selectRpcUrl',
'selectSelectedNetworkClientId',
'selectTicker'
]
.map((method) => `(${method})`)
.join('|')}/]`,
message: 'Avoid using global network selectors in confirmations',
},
],
},
},
],

globals: {
Expand Down Expand Up @@ -113,7 +163,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
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
127 changes: 94 additions & 33 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -4,54 +4,60 @@
* @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
.github/CODEOWNERS @MetaMask/mobile-platform
patches/ @MetaMask/mobile-platform
app/core/Engine.ts @MetaMask/mobile-platform
app/core/Engine.test.js @MetaMask/mobile-platform

# Supply Chain Team
bitrise.yml @MetaMask/supply-chain @MetaMask/mobile-platform
yarn.lock @MetaMask/supply-chain @MetaMask/mobile-platform
ios/Podfile.lock @MetaMask/supply-chain @MetaMask/mobile-platform
app/core/Engine/Engine.ts @MetaMask/mobile-platform
app/core/Engine/Engine.test.ts @MetaMask/mobile-platform
app/core/Engine/index.ts @MetaMask/mobile-platform
app/core/Engine/types.ts @MetaMask/mobile-platform
app/core/Analytics/ @MetaMask/mobile-platform
app/util/metrics/ @MetaMask/mobile-platform
app/components/hooks/useMetrics/ @MetaMask/mobile-platform
app/store/migrations/ @MetaMask/mobile-platform
bitrise.yml @MetaMask/mobile-platform
yarn.lock @MetaMask/mobile-platform
ios/Podfile.lock @MetaMask/mobile-platform

# Ramps Team
app/components/UI/Ramp/ @MetaMask/ramp @MetaMask/mobile-platform
app/reducers/fiatOrders/ @MetaMask/ramp @MetaMask/mobile-platform
app/components/UI/Ramp/ @MetaMask/ramp
app/reducers/fiatOrders/ @MetaMask/ramp

# Confirmation Team
app/components/Views/confirmations @MetaMask/confirmations @MetaMask/mobile-platform
ppom @MetaMask/confirmations @MetaMask/mobile-platform
app/components/Views/confirmations @MetaMask/confirmations
ppom @MetaMask/confirmations

# All below files are maintained by the SDK team because they contain SDK related code, WalletConnect integrations, or critical SDK flows.
app/actions/sdk @MetaMask/sdk-devs @MetaMask/mobile-platform
app/components/Approvals/WalletConnectApproval @MetaMask/sdk-devs @MetaMask/mobile-platform
app/components/Views/SDK @MetaMask/sdk-devs @MetaMask/mobile-platform
app/components/Views/WalletConnectSessions @MetaMask/sdk-devs @MetaMask/mobile-platform
app/core/BackgroundBridge/WalletConnectPort.ts @MetaMask/sdk-devs @MetaMask/mobile-platform
app/core/DeeplinkManager @MetaMask/sdk-devs @MetaMask/mobile-platform
app/core/RPCMethods/RPCMethodMiddleware.ts @MetaMask/sdk-devs @MetaMask/mobile-platform
app/core/SDKConnect @MetaMask/sdk-devs @MetaMask/mobile-platform
app/core/WalletConnect @MetaMask/sdk-devs @MetaMask/mobile-platform
app/reducers/sdk @MetaMask/sdk-devs @MetaMask/mobile-platform
app/util/walletconnect.js @MetaMask/sdk-devs @MetaMask/mobile-platform
app/actions/sdk @MetaMask/sdk-devs
app/components/Approvals/WalletConnectApproval @MetaMask/sdk-devs
app/components/Views/SDK @MetaMask/sdk-devs
app/components/Views/WalletConnectSessions @MetaMask/sdk-devs
app/core/BackgroundBridge/WalletConnectPort.ts @MetaMask/sdk-devs
app/core/DeeplinkManager @MetaMask/sdk-devs
app/core/RPCMethods/RPCMethodMiddleware.ts @MetaMask/sdk-devs
app/core/SDKConnect @MetaMask/sdk-devs
app/core/WalletConnect @MetaMask/sdk-devs
app/reducers/sdk @MetaMask/sdk-devs
app/util/walletconnect.js @MetaMask/sdk-devs

# Accounts Team
app/core/Encryptor/ @MetaMask/accounts-engineers
app/core/Encryptor/ @MetaMask/accounts-engineers
app/core/Engine/controllers/accounts @MetaMask/accounts-engineers

# Swaps Team
app/components/UI/Swaps @MetaMask/swaps-engineers @MetaMask/mobile-platform
app/components/UI/Swaps @MetaMask/swaps-engineers

# Notifications Team
app/components/Views/Notifications @MetaMask/notifications @MetaMask/mobile-platform
app/components/Views/Settings/NotificationsSettings @MetaMask/notifications @MetaMask/mobile-platform
app/components/UI/Notifications @MetaMask/notifications @MetaMask/mobile-platform
app/reducers/notification @MetaMask/notifications @MetaMask/mobile-platform
app/actions/notification @MetaMask/notifications @MetaMask/mobile-platform
app/selectors/notification @MetaMask/notifications @MetaMask/mobile-platform
app/util/notifications @MetaMask/notifications @MetaMask/mobile-platform
app/store/util/notifications @MetaMask/notifications @MetaMask/mobile-platform
app/components/Views/Notifications @MetaMask/notifications
app/components/Views/Settings/NotificationsSettings @MetaMask/notifications
app/components/UI/Notifications @MetaMask/notifications
app/reducers/notification @MetaMask/notifications
app/actions/notification @MetaMask/notifications
app/selectors/notification @MetaMask/notifications
app/util/notifications @MetaMask/notifications
app/store/util/notifications @MetaMask/notifications

# LavaMoat Team
ses.cjs @MetaMask/supply-chain
Expand All @@ -60,3 +66,58 @@ 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
1 change: 1 addition & 0 deletions .github/scripts/bitrise/.yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ignore-scripts true
Loading

0 comments on commit 1ea6045

Please sign in to comment.