Skip to content

Commit

Permalink
Merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
gantunesr committed Mar 31, 2023
2 parents 5ec6a86 + 8aac1e0 commit 4d36535
Show file tree
Hide file tree
Showing 457 changed files with 26,383 additions and 3,560 deletions.
1 change: 1 addition & 0 deletions .android.env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export MM_FOX_CODE="EXAMPLE_FOX_CODE"
export MM_BRANCH_KEY_TEST=
export MM_BRANCH_KEY_LIVE=
export MM_MIXPANEL_TOKEN=
8 changes: 8 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ module.exports = {
files: ['*.{ts,tsx}'],
extends: ['@metamask/eslint-config-typescript'],
},
{
files: ['scripts/**/*.js'],
rules: {
'no-console': 0,
'import/no-commonjs': 0,
'import/no-nodejs-modules': 0,
},
},
],

globals: {
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ jobs:
with:
args: >
-Dsonar.javascript.lcov.reportPaths=tests/coverage/lcov.info
-Dsonar.exclusions=android/,ios/,storybook/,sources/,scripts/,e2e/,wdio/
-Dsonar.tests=app/
-Dsonar.test.inclusions=**/*.test.*
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,7 @@ wdio/reports/
local.log
browserstack.err
.priv.wallet.js

# Detox
# Artifacts generated by failing e2e tests
/artifacts
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "ios/mixpanel-iphone"]
path = ios/mixpanel-iphone
url = https://github.com/mixpanel/mixpanel-iphone
[submodule "ios/branch-ios-sdk"]
path = ios/branch-ios-sdk
url = https://github.com/BranchMetrics/ios-branch-deep-linking-attribution
Expand Down
5 changes: 3 additions & 2 deletions .iyarc
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# improved-yarn-audit advisory exclusions
1085140, 1085135
GHSA-p8p7-x288-28g6
# excluded and patched using this current patch patches/request+2.88.2.patch
# improved-yarn-audit advisory exclusions
2 changes: 2 additions & 0 deletions .js.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,7 @@ export MM_SENTRY_DSN=""
# defined as secrets to run on Bitrise CI
# but have to be defined here for local tests
export MM_TEST_ACCOUNT_SRP=""
export MM_TEST_ACCOUNT_PRIVATE_KEY=""

# address is the address of the first account generated from the previous SRP
export MM_TEST_ACCOUNT_ADDRESS=""
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.13.0
v16
6 changes: 5 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"yaml.schemas": {
"file:///Users/bruno/.vscode/extensions/gizmos.docs-yaml-0.1.5/schemas/toc.schema.json": "/toc\\.yml/i"
}
},

"cucumberautocomplete.steps": ["wdio/step-definitions/**/*.js"],
"cucumberautocomplete.syncfeatures": "wdio/to/features/*.feature",
"cucumberautocomplete.strictGherkinCompletion": true
}
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,29 @@

## Current Main Branch

## 6.2.0 - Mar 21, 2023
- [#5890](https://github.com/MetaMask/metamask-mobile/pull/5890): [FIX] Swap with wallet connect
- [#5807](https://github.com/MetaMask/metamask-mobile/pull/5807): [IMPROVEMENT] "preview build" support to Bitrise
- [#5924](https://github.com/MetaMask/metamask-mobile/pull/5924): [UPDATE] the README setup steps
- [#5901](https://github.com/MetaMask/metamask-mobile/pull/5901): [UPDATE] assets-controllers patch
- [#5870](https://github.com/MetaMask/metamask-mobile/pull/5870): [IMPROVEMENT] On-ramp: Add buy crypto home button
- [#5880](https://github.com/MetaMask/metamask-mobile/pull/5880): [UPDATE] Display internet protocol on the new origin pill
- [#5529](https://github.com/MetaMask/metamask-mobile/pull/5529): [IMPROVEMENT] Network Controller refactor to use the same selector
- [#5859](https://github.com/MetaMask/metamask-mobile/pull/5859): [UPDATE] scan icon on wallet view
- [#5868](https://github.com/MetaMask/metamask-mobile/pull/5868): [IMPROVEMENT] permitted account balance
- [#5842](https://github.com/MetaMask/metamask-mobile/pull/5842): [IMPROVEMENT] show the url protocol
- [#5309](https://github.com/MetaMask/metamask-mobile/pull/5309): [IMPROVEMENT] New transaction header for approve and approval modal
- [#5825](https://github.com/MetaMask/metamask-mobile/pull/5825): [Improvement] Send Token E2E test
- [#5857](https://github.com/MetaMask/metamask-mobile/pull/5857): [IMPROVEMENT] Cherry pick QR scan bug fixes from v6.1 to main
- [#5855](https://github.com/MetaMask/metamask-mobile/pull/5855): [IMPROVEMENT] dont render suspect links
- [#5827](https://github.com/MetaMask/metamask-mobile/pull/5827): [IMPROVEMENT] analytics: add missing property to connect completed event
- [#5711](https://github.com/MetaMask/metamask-mobile/pull/5711): [IMPROVEMENT] Improve signature request message
- [#5750](https://github.com/MetaMask/metamask-mobile/pull/5750): [FIX] Enable clipboard for private credentials
- [#5374](https://github.com/MetaMask/metamask-mobile/pull/5374): [IMPROVEMENT] Authentication refactor
- [#5775](https://github.com/MetaMask/metamask-mobile/pull/5775): [UPDATE] Security Privacy Remember me feature
- [#5803](https://github.com/MetaMask/metamask-mobile/pull/5803): [UPDATE] Sentry: remove DSN value from codebase
- [#5796](https://github.com/MetaMask/metamask-mobile/pull/5796): [UPDATE] `@metamask/phishing-controller` to v2

## 6.1.2 - Mar 03, 2023
- [#5925](https://github.com/MetaMask/metamask-mobile/pull/5925): [FIX] handle all ios biometric errors and create wallet
- [#5906](https://github.com/MetaMask/metamask-mobile/pull/5906): [FIX] Add try-catch to recreateVault
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The code is built using React-Native and running code locally requires a Mac or

- Install [sentry-cli](https://github.com/getsentry/sentry-cli) tools: `brew install getsentry/tools/sentry-cli`

- Install [Node.js](https://nodejs.org) **version 14**
- Install [Node.js](https://nodejs.org) **version 16**

- If you are using [nvm](https://github.com/creationix/nvm#installation) (recommended) running `nvm use` will automatically choose the right node version for you.

Expand All @@ -45,12 +45,14 @@ sudo gem install cocoapods -v 1.11.3
- Install the Android SDK, via [Android Studio](https://developer.android.com/studio).
- _MetaMask Only:_ To create production builds, you need to install Google Play Licensing Library via the SDK Manager in Android Studio.
- Install the Android NDK (version `21.4.7075529`), via [Android Studio](https://developer.android.com/studio)'s SDK Manager.
- Go to Preferences > Appearance & Behavior > System Settings > Android SDK
- Go to Settings > Appearance & Behavior > System Settings > Android SDK
- Shortcut: Selecting `More Actions` > `SDK Manager` from the "Welcome to Android Studio" page will also bring you here.
- Select `SDK Tools` tab
- Locate `NDK (Side-by-side)` option in the tools list
- Check `Show Package Details` option below the tools list to show available versions
- Locate `NDK (Side-by-side)` option in the tools list
- Check NDK version `21.4.7075529`
- Locate `CMake` option in the tools list
- Check CMake version `3.10.2`
- Click "Apply" or "OK" to download
- Linux only:
- Ensure that you have the `secret-tool` binary on your machine.
Expand All @@ -73,7 +75,7 @@ sudo gem install cocoapods -v 1.11.3
- [React Native Getting Started - iOS](https://reactnative.dev/docs/environment-setup#installing-dependencies) _(React Native CLI Quickstart -> [your OS] -> iOS)_
- Install the correct simulator
- **iOS OS Version:** Latest, unless told otherwise
- **Device:** iPhone 11 Pro
- **Device:** iPhone 12 Pro



Expand Down
8 changes: 5 additions & 3 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ android {
applicationId "io.metamask"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1082
versionName "6.1.2"
versionCode 1088
versionName "6.2.0"
multiDexEnabled true
testBuildType System.getProperty('testBuildType', 'debug')
missingDimensionStrategy "minReactNative", "minReactNative46"
Expand All @@ -175,6 +175,7 @@ android {
manifestPlaceholders = [
MM_BRANCH_KEY_TEST: "$System.env.MM_BRANCH_KEY_TEST",
MM_BRANCH_KEY_LIVE: "$System.env.MM_BRANCH_KEY_LIVE",
MM_MIXPANEL_TOKEN: "$System.env.MM_MIXPANEL_TOKEN"
]
missingDimensionStrategy 'react-native-camera', 'general'
}
Expand Down Expand Up @@ -282,7 +283,8 @@ dependencies {
implementation 'org.chromium:v8-android:+'
implementation 'com.google.android.gms:play-services-wallet:18.0.0'
implementation "io.branch.sdk.android:library:5.+"
androidTestImplementation('com.wix:detox:+') { transitive = true }
implementation 'com.mixpanel.android:mixpanel-android:5.+'
androidTestImplementation('com.wix:detox:+') { transitive = true }
androidTestImplementation 'junit:junit:4.12'
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
implementation "com.android.installreferrer:installreferrer:2.2"
Expand Down
4 changes: 4 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@
android:value="io.metamask"/>
<meta-data android:name="com.dieam.reactnativepushnotification.notification_color"
android:resource="@color/lightgray"/>
<!-- MIXPANEL -->
<meta-data android:name="com.mixpanel.android.mpmetrics.MixpanelAPI.token" android:value="${MM_MIXPANEL_TOKEN}" />
<activity android:name="com.mixpanel.android.takeoverinapp.TakeoverInAppActivity"
android:theme="@style/com_mixpanel_android_TakeoverInAppActivityTheme"/>

<provider
android:name="androidx.core.content.FileProvider"
Expand Down
9 changes: 9 additions & 0 deletions android/app/src/main/java/io/metamask/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.ReactActivity;
import com.facebook.react.ReactRootView;
import com.mixpanel.android.mpmetrics.MixpanelAPI;
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;

import io.branch.rnbranch.*;
Expand Down Expand Up @@ -33,6 +34,14 @@ protected String getMainComponentName() {
protected void onStart() {
super.onStart();
RNBranchModule.initSession(getIntent().getData(), this);

try{
ApplicationInfo ai = this.getPackageManager().getApplicationInfo(this.getPackageName(), PackageManager.GET_META_DATA);
String mixpanelToken = (String)ai.metaData.get("com.mixpanel.android.mpmetrics.MixpanelAPI.token");
MixpanelAPI.getInstance(this, mixpanelToken);
}catch (PackageManager.NameNotFoundException e){
Log.d("RCTAnalytics","init:token missing");
}
}

@Override
Expand Down
2 changes: 2 additions & 0 deletions android/app/src/main/java/io/metamask/MainApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.airbnb.android.react.lottie.LottiePackage;
import com.swmansion.gesturehandler.react.RNGestureHandlerPackage;
import io.branch.rnbranch.RNBranchModule;
import io.metamask.nativeModules.RCTAnalyticsPackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.soloader.SoLoader;
Expand Down Expand Up @@ -39,6 +40,7 @@ protected List<ReactPackage> getPackages() {
List<ReactPackage> packages = new PackageList(this).getPackages();
packages.add(new LottiePackage());
packages.add(new RNGestureHandlerPackage());
packages.add(new RCTAnalyticsPackage());
packages.add(new PreventScreenshotPackage());
packages.add(new ReactVideoPackage());

Expand Down
Loading

0 comments on commit 4d36535

Please sign in to comment.