Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
dc7cedd
fix: asset picker scroll in metamask pay on android (#22525)
matthewwalsh0 Nov 12, 2025
af25de6
feat: extra details if single win in predict claim (#22369)
matthewwalsh0 Nov 12, 2025
567ba8d
fix(perps): rerender tabs when the amount of tabs changes cp-7.59.0 (…
michalconsensys Nov 12, 2025
601632f
test: allocate resource ports dynamically (#22158)
cmd-ob Nov 12, 2025
ed55b41
fix: add specific error message for duplicate SRP imports (#22536)
mathieuartu Nov 12, 2025
7eec9ed
feat: trending main search (#22535)
juanmigdr Nov 12, 2025
ce4c851
chore: segment events for QR scanner (#22287)
vinnyhoward Nov 12, 2025
6fe856c
fix(perps): enable live PnL in perps position card cp-7.59.0 (#22487)
michalconsensys Nov 12, 2025
a0fadc7
chore: App State Service (#21310)
tommasini Nov 12, 2025
dc67be4
chore(ci): update BUGBOT rules and file location (#22360)
michaelmccallam Nov 12, 2025
b000065
feat: Integrate Rewards with Predict (#22546)
andrepimenta Nov 12, 2025
c930907
feat: Swaps tron integration (#21294)
bfullam Nov 12, 2025
4b978aa
chore: remove Text component wrappers from BottomSheetHeader children…
georgewrmarshall Nov 12, 2025
84fd139
feat: eas updates initial setup (#22467)
weitingsun Nov 12, 2025
1d866f9
feat: Predict GTM Modal (#22530)
andrepimenta Nov 12, 2025
8b9311a
fix: invalid QR code showing alert multiple times (#22292)
weitingsun Nov 12, 2025
ae9fd8a
fix(predict): optimistic updates when querying claimable positions (#…
matallui Nov 12, 2025
dd54be0
test: Check geo restriction for add funds (#22490)
hjetpoluru Nov 12, 2025
9be12a6
chore: cp-7.59.0 input fixes (#22508)
georgewrmarshall Nov 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .cursor/BUGBOT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# BUGBOT Rules

## Core Mission

Automated test quality enforcement and bug detection for MetaMask Mobile React Native codebase

## Execution Protocol

### 1. Initial Setup

- **ALWAYS** load and reference [unit testing guidelines](rules/unit-testing-guidelines.mdc)
- Verify test file naming pattern: `*.test.{ts,tsx,js,jsx}`
- Check for proper Jest/React Native Testing Library imports

Use the rules in the[unit testing guidelines](rules/unit-testing-guidelines.mdc) to enforce the test quality and bug detection.
174 changes: 0 additions & 174 deletions .cursor/rules/BUGBOT.md

This file was deleted.

1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ app/core/Engine/types.ts @MetaMask/mobile-pla
app/core/Engine/controllers/remote-feature-flag-controller/ @MetaMask/mobile-platform
app/core/DeeplinkManager @MetaMask/mobile-platform
scripts/build.sh @MetaMask/mobile-platform
scripts/update-expo-channel.js @MetaMask/mobile-admins

# Platform & Snaps Code Fencing File
metro.transform.js @MetaMask/mobile-platform @MetaMask/core-platform
Expand Down
3 changes: 3 additions & 0 deletions .js.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ export WALLET_CONNECT_PROJECT_ID=""
# Default PORT for metro
export WATCHER_PORT=8081

# Expo Project ID for OTA updates
export EXPO_PROJECT_ID=""

# Environment: "production", "pre-release" or "dev"
export METAMASK_ENVIRONMENT="dev"

Expand Down
50 changes: 50 additions & 0 deletions .yarn/patches/expo-updates-npm-0.27.4-2a215516d7.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
diff --git a/android/src/main/java/expo/modules/updates/UpdatesPackage.kt b/android/src/main/java/expo/modules/updates/UpdatesPackage.kt
index f697c9822c32544ddfcd62e218c09555bcb2915d..2c29988517b294b26714bccd371f5e836dd3b834 100644
--- a/android/src/main/java/expo/modules/updates/UpdatesPackage.kt
+++ b/android/src/main/java/expo/modules/updates/UpdatesPackage.kt
@@ -1,6 +1,5 @@
package expo.modules.updates

-import android.app.Application
import android.content.Context
import androidx.annotation.UiThread
import androidx.annotation.WorkerThread
@@ -8,7 +7,6 @@ import com.facebook.react.ReactActivity
import com.facebook.react.ReactNativeHost
import com.facebook.react.bridge.ReactContext
import com.facebook.react.devsupport.interfaces.DevSupportManager
-import expo.modules.core.interfaces.ApplicationLifecycleListener
import expo.modules.core.interfaces.Package
import expo.modules.core.interfaces.ReactActivityHandler
import expo.modules.core.interfaces.ReactNativeHostHandler
@@ -94,30 +92,6 @@ class UpdatesPackage : Package {
return listOf(handler)
}

- override fun createApplicationLifecycleListeners(context: Context): List<ApplicationLifecycleListener> {
- val handler = object : ApplicationLifecycleListener {
- override fun onCreate(application: Application) {
- super.onCreate(application)
- if (isRunningAndroidTest()) {
- // Preload updates to prevent Detox ANR
- UpdatesController.initialize(context)
- UpdatesController.instance.launchAssetFile
- }
- }
- }
-
- return listOf(handler)
- }
-
- private fun isRunningAndroidTest(): Boolean {
- try {
- Class.forName("androidx.test.espresso.Espresso")
- return true
- } catch (_: ClassNotFoundException) {
- }
- return false
- }
-
companion object {
private val TAG = UpdatesPackage::class.java.simpleName
val isUsingNativeDebug = BuildConfig.EX_UPDATES_NATIVE_DEBUG
29 changes: 28 additions & 1 deletion app.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const { RUNTIME_VERSION, PROJECT_ID, UPDATE_URL } = require('./ota.config.js');

module.exports = {
name: 'MetaMask',
displayName: 'MetaMask',
Expand All @@ -15,7 +17,9 @@ module.exports = {
'../../node_modules/@notifee/react-native/android/libs',
],
},
ios: {},
ios: {
jsEngine: 'hermes',
},
},
],
[
Expand All @@ -36,5 +40,28 @@ module.exports = {
ios: {
bundleIdentifier: 'io.metamask.MetaMask',
usesAppleSignIn: true,
jsEngine: 'hermes',
},
expo: {
owner: 'metamask-test',
runtimeVersion: RUNTIME_VERSION,
updates: {
url: UPDATE_URL,
// Channel is set by requestHeaders, will be overridden with build script
requestHeaders: {
'expo-channel-name': 'preview',
},
},
extra: {
eas: {
projectId: PROJECT_ID,
},
},
android: {
package: 'io.metamask',
},
ios: {
bundleIdentifier: 'io.metamask.MetaMask',
},
},
};
36 changes: 36 additions & 0 deletions app/__mocks__/expo-updates.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Mock for expo-updates module
export const channel = 'test-channel';
export const runtimeVersion = '1.0.0';
export const isEmbeddedLaunch = true;
export const isEnabled = true;
export const updateId = 'mock-update-id';

export const checkForUpdateAsync = jest.fn();
export const fetchUpdateAsync = jest.fn();
export const reloadAsync = jest.fn();
export const useUpdates = jest.fn();

export const UpdateEventType = {
ERROR: 'error',
NO_UPDATE_AVAILABLE: 'noUpdateAvailable',
UPDATE_AVAILABLE: 'updateAvailable',
};

export const UpdateCheckResult = {
isAvailable: false,
manifest: null,
};

export default {
channel,
runtimeVersion,
isEmbeddedLaunch,
isEnabled,
updateId,
checkForUpdateAsync,
fetchUpdateAsync,
reloadAsync,
useUpdates,
UpdateEventType,
UpdateCheckResult,
};
6 changes: 1 addition & 5 deletions app/component-library/components-temp/ButtonFilter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ const MyComponent = () => {
const [filter, setFilter] = useState('all');

return (
<ButtonFilter
isActive={filter === 'all'}
onPress={() => setFilter('all')}
>
<ButtonFilter isActive={filter === 'all'} onPress={() => setFilter('all')}>
All
</ButtonFilter>
);
Expand Down Expand Up @@ -69,4 +66,3 @@ The component uses Tailwind CSS via the `useTailwind` hook and follows the MetaM
/>
</Box>
```

Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ Optional prop to configure the color of the BottomSheetOverlay.

| <span style="color:gray;font-size:14px">TYPE</span> | <span style="color:gray;font-size:14px">REQUIRED</span> |
| :-------------------------------------------------- | :------------------------------------------------------ |
| ColorValue | No |
| ColorValue | No |

### `onPress`

Function to trigger when pressing the BottomSheetOverlay.

| <span style="color:gray;font-size:14px">TYPE</span> | <span style="color:gray;font-size:14px">REQUIRED</span> |
| :-------------------------------------------------- | :------------------------------------------------------ |
| Function | No |
| Function | No |

## Usage

```javascript
<BottomSheetOverlay onPress={() => {}}/>;
<BottomSheetOverlay onPress={() => {}} />
```
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ const styleSheet = (params: { theme: Theme; vars: InputStyleSheetVars }) => {
// Fix for placeholder text shifting with custom Geist fonts
// Use minimal padding that works cross-platform with preloaded fonts
paddingVertical: Platform.OS === 'ios' ? 2 : 1,
// Ensure consistent line height for custom font baseline alignment lineHeight: Platform.OS === 'ios' ? 20 : 22,
// Ensure consistent line height for custom font baseline alignment
lineHeight: Platform.OS === 'ios' ? 20 : 22,
fontFamily: getFontFamily(textVariant),
fontWeight: theme.typography[textVariant].fontWeight,
fontSize: theme.typography[textVariant].fontSize,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ exports[`Input should render correctly 1`] = `
"fontWeight": "400",
"height": 24,
"letterSpacing": 0,
"lineHeight": 20,
"opacity": 1,
"paddingVertical": 2,
"textAlignVertical": "center",
Expand Down
Loading
Loading