Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/MetaMask/metamask-mobile in…
Browse files Browse the repository at this point in the history
…to fix/asset-amount-dif
  • Loading branch information
brianacnguyen committed Dec 18, 2024
2 parents 1fdabf0 + 82fb18c commit 1f2e7c6
Show file tree
Hide file tree
Showing 1,594 changed files with 99,957 additions and 42,657 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
15 changes: 8 additions & 7 deletions .depcheckrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
ignores:
- '@metamask/oss-attribution-generator'
- 'webpack-cli'
- '@react-native-community/datetimepicker'
- '@react-native-community/slider'
- 'patch-package'
- '@lavamoat/allow-scripts'
Expand Down Expand Up @@ -48,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 @@ -72,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 All @@ -90,3 +84,10 @@ ignores:
- 'app'
- 'i18n-js'
- 'images'

## Expo
- '@config-plugins/detox'
- 'cross-spawn'
- 'expo-build-properties'
- 'expo-dev-client'

11 changes: 8 additions & 3 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.qa',
app: process.env.CI ? 'ios.qa' :'ios.debug',
testRunner: {
args: {
"$0": "node e2e/api-specs/run-api-spec-tests.js",
Expand Down
2 changes: 2 additions & 0 deletions .e2e.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ export MM_TEST_ACCOUNT_SRP='word1 word... word12'
export MM_TEST_ACCOUNT_ADDRESS='0x...'
export MM_TEST_ACCOUNT_PRIVATE_KEY=''
export IS_TEST="true"
# Temporary mechanism to enable security alerts API prior to release.
export MM_SECURITY_ALERTS_API_ENABLED="true"
35 changes: 34 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,16 @@ module.exports = {
rules: {
// under discussion
'no-unused-vars': 'off',
'react/no-unstable-nested-components': [
'warn',
{
allowAsProps: true,
},
],
},
},
{
files: ['scripts/**/*.js'],
files: ['scripts/**/*.js', 'app.config.js'],
rules: {
'no-console': 0,
'import/no-commonjs': 0,
Expand All @@ -67,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
82 changes: 48 additions & 34 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -7,51 +7,66 @@
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

# 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
.github/CODEOWNERS @MetaMask/mobile-platform
patches/ @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/Engine/controllers/RemoteFeatureFlagController/ @MetaMask/mobile-platform
app/core/Analytics/ @MetaMask/mobile-platform
app/util/metrics/ @MetaMask/mobile-platform
app/components/hooks/useMetrics/ @MetaMask/mobile-platform
app/selectors/featureFlagController/* @MetaMask/mobile-platform
app/selectors/featureFlagController/minimumAppVersion/ @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/AccountsController @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

# Identity Team
app/actions/identity @MetaMask/identity
app/util/identity @MetaMask/identity
app/components/UI/ProfileSyncing @MetaMask/identity
e2e/specs/identity @MetaMask/identity

# LavaMoat Team
ses.cjs @MetaMask/supply-chain
Expand Down Expand Up @@ -109,7 +124,6 @@ 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
Expand Down
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ body:
- In production (default)
- In beta
- During release testing
- On the development branch
- On main branch
- On a feature branch
validations:
required: true
- type: input
Expand Down
3 changes: 2 additions & 1 deletion .github/guidelines/LABELING_GUIDELINES.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ To merge your PR one of the following QA labels are required:
- **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.
- **regression-main**: 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.
- **feature-branch-bug**: This label can manually be added to a bug report issue at the time of its creation if the bug is present on a feature branch, i.e., before merging to `main`.

### Labels prohibited when PR needs to be merged:
Any PR that includes one of the following labels can not be merged:
Expand Down
Loading

0 comments on commit 1f2e7c6

Please sign in to comment.