Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(CI): Bitrise M1 Machine and React Native 0.71.6 compatibility upgrade #6327

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
7606ded
[FIX] Gas is not re-calculated when updating a transaction (#5876)
blackdevelopa Apr 28, 2023
d6059b5
enable M1 builds on RN
sethkfman Apr 28, 2023
d2eb3e0
updated NDK version
sethkfman Apr 28, 2023
942021d
bump to new workflow step and NDK version
sethkfman Apr 28, 2023
cf59b2c
log out NDK home after install
sethkfman Apr 28, 2023
3e9140e
[FEATURE][MC] - Edit account name view (#6165)
tommasini Apr 28, 2023
6240671
Cleanup approve transaction review (#6213)
jpuri Apr 29, 2023
454fb38
Revert "ci: temporarily downgrade ubuntu to 20.04" (#5199)
legobeat May 1, 2023
effdbdb
Fix duplicate test name lint warning (#6304)
Gudahtt May 1, 2023
4f4e82d
removed version print out step
sethkfman May 1, 2023
c8c1825
update bitrise step version
sethkfman May 1, 2023
f6ecf9f
updated ndk version
sethkfman May 1, 2023
0166827
added local prop file
sethkfman May 1, 2023
164b363
update build step and add local.properties file in android
sethkfman May 2, 2023
9d0d760
update local prop script
sethkfman May 2, 2023
2ddcff6
bump ndk version in metamask gradle
sethkfman May 2, 2023
55dc676
added strings to be translated for feature #6230 (#6308)
sethkfman May 2, 2023
2f7d589
bump ndk version
sethkfman May 2, 2023
15dc40b
add the NDK path to root gradle
sethkfman May 2, 2023
178c983
added hard code NDK version and path
sethkfman May 2, 2023
a65c126
deps: force xml2js@>=0.5.0 via resolutions (#6240)
legobeat May 2, 2023
2efe717
updated rootproject properties
sethkfman May 3, 2023
ab3b7fb
only update NDK version in patch
sethkfman May 3, 2023
2285dd3
only update NDK version
sethkfman May 3, 2023
8444246
removed local prop build step
sethkfman May 3, 2023
1cbfeb1
Revert "only update NDK version"
sethkfman May 3, 2023
6bc9c78
Revert "Revert "only update NDK version""
sethkfman May 3, 2023
b3a1490
pull NDK path and bitrise script updates
sethkfman May 3, 2023
62a7285
update filepath, script and gradle config to be more dynamic
sethkfman May 3, 2023
f8df358
bump to max large M1
sethkfman May 3, 2023
66513b7
update gradle to provide NDK path for bitrise
sethkfman May 3, 2023
9f36fec
more dynamic ndk path options
sethkfman May 3, 2023
335f840
update ndk path check
sethkfman May 3, 2023
6020368
added if check to function
sethkfman May 3, 2023
cf61a36
updated gradle for test
sethkfman May 3, 2023
c25d553
updated gradle for test remove env check
sethkfman May 3, 2023
e1b9133
remove if check in react android patch
sethkfman May 3, 2023
d7e56a9
updated ndkPath
sethkfman May 3, 2023
643ab71
Merge branch 'upgrade/react-native/0.71.6-hermes' into upgrade/RN-bit…
sethkfman May 3, 2023
8f31ae3
update build gradle
sethkfman May 3, 2023
baca931
remove ndk version
sethkfman May 3, 2023
8c490c9
remove ndk from gradle
sethkfman May 3, 2023
971b72a
removed ndkVersion
sethkfman May 3, 2023
6ea54ed
uncommented ndkVersion
sethkfman May 3, 2023
f0d8a2e
update file path name
sethkfman May 3, 2023
8f26fa9
updated builds with name correction
sethkfman May 3, 2023
c611cd8
update version on install-missing-android-tools bitrise builds
sethkfman May 3, 2023
41fe584
Merge branch 'upgrade/react-native/0.71.6-hermes' into upgrade/RN-bit…
sethkfman May 3, 2023
9167a68
devDeps: Remove concat-cli (#6315)
legobeat May 3, 2023
f68e629
Refactor SendTo - extract code to render from / to addresses into sep…
blackdevelopa May 4, 2023
a601d3a
On-ramp: Add redux-thunk, refactor successful order handler (#6257)
wachunei May 4, 2023
c249e1f
Fix missing handler on mandatory modal (#6309)
Cal-L May 4, 2023
bf454e1
feature(on-ramp): add development environment to onramp-sdk (#6325)
wachunei May 4, 2023
360f8b7
On-ramp: fix missing network name (#6340)
wachunei May 4, 2023
9c18839
6.5.0 (#6241)
github-actions[bot] May 4, 2023
c92c7b5
New Crowdin translations by Github Action (#6208)
metamaskbot May 4, 2023
33bb4fc
Stabilise E2e Android tests on pipeline (#6341)
Andepande May 4, 2023
373e478
[DETOX] Only Run tests with the "smoke" tag in the describe block (#6…
cortisiko May 4, 2023
ca85e7e
Fix readme typos (#6275)
bkirb May 5, 2023
6541a90
sturdier check (#5866)
witmicko May 5, 2023
eb3eaad
Appium/fix reports video failures (#6343)
chrisleewilcox May 5, 2023
7f3fad8
[e2e] Send ETH to an EOA using Ganache network on Android (#6215)
seaona May 5, 2023
82ebe72
Fix yarn watch clean (#6339)
matthewwalsh0 May 5, 2023
21931fd
enable proguard for release and QA builds
sethkfman May 5, 2023
f39bbb6
merged main
sethkfman May 5, 2023
db3a4f1
Merge branch 'update/enable-proguard' into upgrade/RN-bitrise-machines
sethkfman May 5, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/bump-version-name.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
types: [opened]
jobs:
bump-version-name:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
if: "contains(github.head_ref, 'release/')"
permissions:
contents: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
CLABot:
if: github.event_name == 'pull_request_target' || contains(github.event.comment.html_url, '/pull/')
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:

jobs:
create-release-pr:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/crowdin_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:

jobs:
synchronize-with-crowdin:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

steps:

Expand Down
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,33 @@

## Current Main Branch

## 6.5.0 - May 4, 2023
- [#5743](https://github.com/MetaMask/metamask-mobile/pull/5743): [FEATURE] On-ramp: Add buy-crypto deeplink
- [#6201](https://github.com/MetaMask/metamask-mobile/pull/6201): [FIX] [SDK] Missing redirect breaking backward compatibility
- [#6232](https://github.com/MetaMask/metamask-mobile/pull/6232): [FIX] bottom margin for detecting end of the page
- [#6166](https://github.com/MetaMask/metamask-mobile/pull/6166): [FEATURE] trigger walletconnect modal using approval controller
- [#6223](https://github.com/MetaMask/metamask-mobile/pull/6223): [IMPROVEMENT] Update to Node.js v16
- [#6051](https://github.com/MetaMask/metamask-mobile/pull/6051): [FEATURE] Total balance and portfolio button changed
- [#6156](https://github.com/MetaMask/metamask-mobile/pull/6156): [IMPROVEMENT] On-ramp: Use dynamic list of networks
- [#6145](https://github.com/MetaMask/metamask-mobile/pull/6145): [IMPROVEMENT] Synced and optimized icons
- [#6138](https://github.com/MetaMask/metamask-mobile/pull/6138): [FEATURE] On-ramp: Add orderProcessor exponential backoff for orders
- [#6139](https://github.com/MetaMask/metamask-mobile/pull/6139): [FEATURE] On-ramp: Add same amount rendering as the order details to the order list
- [#6189](https://github.com/MetaMask/metamask-mobile/pull/6189): [FEATURE] On-ramp: Remove hiding the provider modal when quotes refresh
- [#6216](https://github.com/MetaMask/metamask-mobile/pull/6216): [IMPROVEMENT] account icon matches user's preferred identicon
- [#5956](https://github.com/MetaMask/metamask-mobile/pull/5956): [IMPROVEMENT] Show token symbol in verify contract details
- [#5458](https://github.com/MetaMask/metamask-mobile/pull/5458): [IMPROVEMENT] Support sepolia network
- [#6185](https://github.com/MetaMask/metamask-mobile/pull/6185): [FIX] remove pubnub package and associated sync with extension code
- [#6181](https://github.com/MetaMask/metamask-mobile/pull/6181): [IMPROVEMENT] Componentize Header Component
- [#6153](https://github.com/MetaMask/metamask-mobile/pull/6153): [IMPROVEMENT] On-ramp: Refactor order selector by id
- [#6044](https://github.com/MetaMask/metamask-mobile/pull/6044): [IMPROVEMENT] Componentize Badge and Badge Wrapper
- [#6180](https://github.com/MetaMask/metamask-mobile/pull/6180): [IMPROVEMENT] Componentized Overlay Component
- [#6173](https://github.com/MetaMask/metamask-mobile/pull/6173): [REFACTOR] Auto Lock section
- [#6174](https://github.com/MetaMask/metamask-mobile/pull/6174): [IMPROVEMENT] Update Tab bar styles
- [#6056](https://github.com/MetaMask/metamask-mobile/pull/6056): [IMPROVEMENT] Show Identicon for unknown token and if token icon is unknown
- [#6076](https://github.com/MetaMask/metamask-mobile/pull/6076): [BUGFIX] Fixes WalletConnect deep links (wc:// schema) not working properly
- [#6157](https://github.com/MetaMask/metamask-mobile/pull/6157): [REFACTOR] Change Password setting
- [#5718](https://github.com/MetaMask/metamask-mobile/pull/5718): [FIX] Nonce Too Low for Approve Transaction

## 6.4.0 - Apr 20, 2023
- [#6144](https://github.com/MetaMask/metamask-mobile/pull/6144): [FEATURE] New Crowdin translations by Github Action
- [#6143](https://github.com/MetaMask/metamask-mobile/pull/6143): [UPDATE] Crowdin token to use METAMASKBOT_CROWDIN_TOKEN
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ For local testing, the wallet is created using the secret recovery phrase from t
##### iOS
All tests live within the e2e/specs folder.

Prequisites for running tests:
Prerequisites for running tests:
- Make sure to install `detox-cli` by referring to the instructions mentioned [here](https://wix.github.io/Detox/docs/introduction/getting-started/#detox-prerequisites).
- Additionally, install `applesimutils` by following the guidelines provided [here](https://github.com/wix/AppleSimulatorUtils).
- Before running any tests, it's recommended to refer to the `iOS section` above and check the latest simulator device specified under `Install the correct simulator`.
Expand Down Expand Up @@ -246,7 +246,12 @@ If you have already built the application for Detox and want to run a specific t
```bash
yarn test:e2e:ios:debug:single e2e/specs/TEST_NAME.spec.js
```
To run tests associated with a certain tag, you can do so using the `--testNamePattern` flag. For example:

```bash
yarn test:e2e:ios:debug --testNamePattern="Smoke"
```
This runs all tests that are tagged "Smoke"
##### Android
All android tests live within the wdio/feature folder.

Expand Down Expand Up @@ -286,7 +291,7 @@ To get a better understanding of the internal architecture of this app take a lo

### Storybook

We have begun documenting our components using storybook please read the [Documentation Guidelines](./storybook/DOCUMENTATION_GUIDELINES.md) to get up and running.
We have begun documenting our components using Storybook. Please read the [Documentation Guidelines](./storybook/DOCUMENTATION_GUIDELINES.md) to get up and running.

### Other Docs

Expand Down
49 changes: 27 additions & 22 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def enableSeparateBuildPerCPUArchitecture = false
/**
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
*/
def enableProguardInReleaseBuilds = false
def enableProguardInReleaseBuilds = true

/**
* The preferred build flavor of JavaScriptCore (JSC)
Expand All @@ -123,6 +123,14 @@ def reactNativeArchitectures() {
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
}

/**
* Adding function that will retuen the Bitrise ndkPath if it is a QA or Production Build
*/
def ndkPath() {
return System.getenv('METAMASK_ENVIRONMENT') == 'qa' || System.getenv('METAMASK_ENVIRONMENT') == 'production' ? rootProject.ext.bitriseNdkPath : ""
}


android {
ndkVersion rootProject.ext.ndkVersion

Expand All @@ -148,24 +156,24 @@ android {
}

signingConfigs {
release {
storeFile file('../keystores/release.keystore')
storePassword System.getenv("BITRISEIO_ANDROID_KEYSTORE_PASSWORD")
keyAlias System.getenv("BITRISEIO_ANDROID_KEYSTORE_ALIAS")
keyPassword System.getenv("BITRISEIO_ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD")
}
qa {
storeFile file('../keystores/internalRelease.keystore')
storePassword System.getenv("BITRISEIO_ANDROID_QA_KEYSTORE_PASSWORD")
keyAlias System.getenv("BITRISEIO_ANDROID_QA_KEYSTORE_ALIAS")
keyPassword System.getenv("BITRISEIO_ANDROID_QA_KEYSTORE_PRIVATE_KEY_PASSWORD")
}
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
release {
storeFile file('../keystores/release.keystore')
storePassword System.getenv("BITRISEIO_ANDROID_KEYSTORE_PASSWORD")
keyAlias System.getenv("BITRISEIO_ANDROID_KEYSTORE_ALIAS")
keyPassword System.getenv("BITRISEIO_ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD")
}
qa {
storeFile file('../keystores/internalRelease.keystore')
storePassword System.getenv("BITRISEIO_ANDROID_QA_KEYSTORE_PASSWORD")
keyAlias System.getenv("BITRISEIO_ANDROID_QA_KEYSTORE_ALIAS")
keyPassword System.getenv("BITRISEIO_ANDROID_QA_KEYSTORE_PRIVATE_KEY_PASSWORD")
}
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
}

splits {
Expand All @@ -184,9 +192,6 @@ android {
}
release {
manifestPlaceholders.isDebug = false
// Caution! In production, you need to generate your own keystore file.
// see https://reactnative.dev/docs/signed-apk-android.
signingConfig signingConfigs.debug
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
Expand Down
3 changes: 2 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ buildscript {
compileSdkVersion = 33
targetSdkVersion = 33
// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
ndkVersion = "23.1.7779620"
ndkVersion = "24.0.8215888"
bitriseNdkPath = "/usr/local/share/android-sdk/ndk-bundle"
kotlin_version = "1.7.0"
kotlinVersion = "$kotlin_version"
supportLibVersion = "28.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ const ModalMandatory = ({ route }: MandatoryModalProps) => {
activeOpacity={1}
{...generateTestId(Platform, TERMS_OF_USE_CHECKBOX_ICON_ID)}
>
<Checkbox isChecked={isCheckboxSelected} />
<Checkbox onPress={handleSelect} isChecked={isCheckboxSelected} />
<Text style={styles.checkboxText}>{checkboxText}</Text>
</TouchableOpacity>
<ButtonPrimary
Expand Down
11 changes: 11 additions & 0 deletions app/components/Nav/App/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ import SDKLoadingModal from '../../Views/SDKLoadingModal/SDKLoadingModal';
import SDKFeedbackModal from '../../Views/SDKFeedbackModal/SDKFeedbackModal';
import AccountActions from '../../../components/Views/AccountActions';
import WalletActions from '../../Views/WalletActions';
import EditAccountName from '../../Views/EditAccountName/EditAccountName';

const clearStackNavigatorOptions = {
headerShown: false,
Expand Down Expand Up @@ -550,6 +551,12 @@ const App = ({ userLoggedIn }) => {
</Stack.Navigator>
);

const EditAccountNameFlow = () => (
<Stack.Navigator>
<Stack.Screen name="EditAccountName" component={EditAccountName} />
</Stack.Navigator>
);

return (
// do not render unless a route is defined
(route && (
Expand Down Expand Up @@ -612,6 +619,10 @@ const App = ({ userLoggedIn }) => {
component={ConnectQRHardwareFlow}
options={{ animationEnabled: true }}
/>
<Stack.Screen
name="EditAccountName"
component={EditAccountNameFlow}
/>
</Stack.Navigator>
</NavigationContainer>
{renderSplash()}
Expand Down
51 changes: 1 addition & 50 deletions app/components/UI/ApproveTransactionReview/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import React, { PureComponent } from 'react';
import {
View,
TouchableOpacity,
InteractionManager,
Linking,
} from 'react-native';
import { View, TouchableOpacity, InteractionManager } from 'react-native';
import Eth from 'ethjs-query';
import ActionView from '../../UI/ActionView';
import PropTypes from 'prop-types';
Expand Down Expand Up @@ -45,13 +40,11 @@ import { WALLET_CONNECT_ORIGIN } from '../../../util/walletconnect';
import { withNavigation } from '@react-navigation/compat';
import {
isTestNet,
isMainnetByChainId,
isMultiLayerFeeNetwork,
fetchEstimatedMultiLayerL1Fee,
} from '../../../util/networks';
import EditPermission from './EditPermission';
import Logger from '../../../util/Logger';
import InfoModal from '../Swaps/components/InfoModal';
import ButtonLink from '../../../component-library/components/Buttons/Button/variants/ButtonLink';
import { getTokenList } from '../../../reducers/tokens';
import TransactionReview from '../../UI/TransactionReview/TransactionReviewEIP1559Update';
Expand Down Expand Up @@ -258,7 +251,6 @@ class ApproveTransactionReview extends PureComponent {
spenderAddress: '0x...',
transaction: this.props.transaction,
token: {},
showGasTooltip: false,
gasTransactionObject: {},
multiLayerL1FeeTotal: '0x0',
fetchingUpdateDone: false,
Expand Down Expand Up @@ -560,46 +552,6 @@ class ApproveTransactionReview extends PureComponent {
);
};

openLinkAboutGas = () =>
Linking.openURL(
'https://community.metamask.io/t/what-is-gas-why-do-transactions-take-so-long/3172',
);

toggleGasTooltip = () =>
this.setState((state) => ({ showGasTooltip: !state.showGasTooltip }));

renderGasTooltip = () => {
const isMainnet = isMainnetByChainId(this.props.chainId);
return (
<InfoModal
isVisible={this.state.showGasTooltip}
title={strings(
`transaction.gas_education_title${isMainnet ? '_ethereum' : ''}`,
)}
toggleModal={this.toggleGasTooltip}
body={
<View>
<Text grey infoModal>
{strings('transaction.gas_education_1')}
{strings(
`transaction.gas_education_2${isMainnet ? '_ethereum' : ''}`,
)}{' '}
<Text bold>{strings('transaction.gas_education_3')}</Text>
</Text>
<Text grey infoModal>
{strings('transaction.gas_education_4')}
</Text>
<TouchableOpacity onPress={this.openLinkAboutGas}>
<Text grey link infoModal>
{strings('transaction.gas_education_learn_more')}
</Text>
</TouchableOpacity>
</View>
}
/>
);
};

renderEditPermission = () => {
const {
host,
Expand Down Expand Up @@ -863,7 +815,6 @@ class ApproveTransactionReview extends PureComponent {
</ActionView>
</View>
</View>
{this.renderGasTooltip()}
</>
);
};
Expand Down
Loading