From 4f5141ac28f03fc505272b63a0868ef33781fa4e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 28 Jul 2023 15:59:59 -0600 Subject: [PATCH] 7.4.0 (#6806) * 7.4.0 * updated format changelog * fix: define ReactNativePayments podspec path in podfile (#6821) * from address changing on transaction object (#6841) * fix: invalid transaction data used for approve transaction (#6833) (#6842) * use valid txn data when approving txn * rename variable Co-authored-by: Sylva Elendu * add check approval request exists before rejecting (#6838) * build 1155 RC2 (#6861) * fix(test): Permission Systems fix taping connect modals (#6868) * fix tapping connect modals * fixed lint issues * removed unused function, not referenced anywhere * chore: merge 7.3.1 cherry-pick (#6923) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore: version bump for 7.4.0 RC 3 (#6924) * build 1159 RC4 (#6928) --------- Co-authored-by: metamaskbot Co-authored-by: sethkfman Co-authored-by: Pedro Pablo Aste Kompen Co-authored-by: tommasini <46944231+tommasini@users.noreply.github.com> Co-authored-by: sethkfman <10342624+sethkfman@users.noreply.github.com> Co-authored-by: Sylva Elendu Co-authored-by: Vinicius Stevam <45455812+vinistevam@users.noreply.github.com> Co-authored-by: Chris Wilcox Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 27 +++++++++++++++++++ android/app/build.gradle | 6 ++--- app/components/Views/Approval/index.js | 20 ++++++++------ .../SendFlow/AddressFrom/AddressFrom.tsx | 2 ++ .../SendFlow/AddressFrom/AddressFrom.types.ts | 1 + app/components/Views/SendFlow/SendTo/index.js | 5 ++++ bitrise.yml | 4 +-- e2e/pages/modals/AddAccountModal.js | 8 +++++- e2e/pages/modals/ConnectModal.js | 11 ++++++++ e2e/pages/modals/ConnectedAccountsModal.js | 8 +++++- ...n-system-removing-imported-account.spec.js | 6 ++--- ios/MetaMask.xcodeproj/project.pbxproj | 16 +++++------ ios/Podfile | 1 + ios/Podfile.lock | 8 +++++- package.json | 2 +- 15 files changed, 97 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b0a2815e5a..e7ba62bd083 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,33 @@ ## Current Main Branch +## 7.4.0 - Jul 14, 2023 +### Added +- [#6805](https://github.com/MetaMask/metamask-mobile/pull/6805): feat(on-ramp): upgrade on-ramp SDK with apple pay support +- [#6679](https://github.com/MetaMask/metamask-mobile/pull/6679): feat(on-ramp): upgrade on-ramp-sdk to v1.22.0 with abort controller support +- [#6799](https://github.com/MetaMask/metamask-mobile/pull/6799): feat: prioritize resume over deeplink to accelerate reconnection flow +- [#6795](https://github.com/MetaMask/metamask-mobile/pull/6795): feat(MMPD-546): update portfolio icon +- [#6738](https://github.com/MetaMask/metamask-mobile/pull/6738): feat: add approval flow success and error pages +- [#6782](https://github.com/MetaMask/metamask-mobile/pull/6782): feat: wc2 dependencies update and handle switchNetwork +- [#6766](https://github.com/MetaMask/metamask-mobile/pull/6766): feat: Added horizontalAlignment to Accordions +- [#6755](https://github.com/MetaMask/metamask-mobile/pull/6755): feat: sdk protocol update + +### Changed +- [#6804](https://github.com/MetaMask/metamask-mobile/pull/6804): refactor(on-ramp): refactor quotes screen +- [#6784](https://github.com/MetaMask/metamask-mobile/pull/6784): refactor: Use selectors for token list controller state access +- [#6758](https://github.com/MetaMask/metamask-mobile/pull/6758): refactor: Use selectors for tokens controller state access +- [#6758](https://github.com/MetaMask/metamask-mobile/pull/6758): refactor: Use selectors for tokens controller state access +- [#6796](https://github.com/MetaMask/metamask-mobile/pull/6796): ci: Fix pipelines to reflect running tests on android detox +- [#6752](https://github.com/MetaMask/metamask-mobile/pull/6752): refactor: Use selectors for currency rate controller state access + +### Fixed +- [#6754](https://github.com/MetaMask/metamask-mobile/pull/6754): fix: sending an ERC20 token with an amount with more decimals than the token decimal, results in nothing +- [#6790](https://github.com/MetaMask/metamask-mobile/pull/6790): fix: update snapshot for linea mainnet +- [#6587](https://github.com/MetaMask/metamask-mobile/pull/6587): fix: Improves handling of missing WCv2 Project ID +- [#6772](https://github.com/MetaMask/metamask-mobile/pull/6772): fix: update cookie-tough dependency +- [#6739](https://github.com/MetaMask/metamask-mobile/pull/6739): fix: deeplink connection using metamask://connect +- [#6753](https://github.com/MetaMask/metamask-mobile/pull/6753): fix: Delete collectible media reproductor + ## 7.3.1 - Jul 26, 2023 - [#6833](https://github.com/MetaMask/metamask-mobile/pull/6833): fix: invalid transaction data used for approve transaction diff --git a/android/app/build.gradle b/android/app/build.gradle index 14efd274aac..0b521199806 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -137,8 +137,8 @@ android { applicationId "io.metamask" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 1156 - versionName "7.3.1" + versionCode 1159 + versionName "7.4.0" testBuildType System.getProperty('testBuildType', 'debug') missingDimensionStrategy 'react-native-camera', 'general' testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" @@ -217,7 +217,7 @@ android { variant.outputs.each { output -> // For each separate APK per architecture, set a unique version code as described here: // https://developer.android.com/studio/build/configure-apk-splits.html - // Example: versionCode 1156 will generate 1001 for armeabi-v7a, 1002 for x86, etc. + // Example: versionCode 1148 will generate 1001 for armeabi-v7a, 1002 for x86, etc. def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4] def abi = output.getFilter(OutputFile.ABI) if (abi != null) { // null for the universal-debug, universal-release variants diff --git a/app/components/Views/Approval/index.js b/app/components/Views/Approval/index.js index 66bd6bccdbb..633f449a7e2 100644 --- a/app/components/Views/Approval/index.js +++ b/app/components/Views/Approval/index.js @@ -138,13 +138,13 @@ class Approval extends PureComponent { try { const { transactionHandled } = this.state; const { transaction, selectedAddress } = this.props; - const { KeyringController } = Engine.context; + const { KeyringController, ApprovalController } = Engine.context; if (!transactionHandled) { if (isQRHardwareAccount(selectedAddress)) { KeyringController.cancelQRSignRequest(); - } else { - Engine.context.ApprovalController.reject( - transaction.id, + } else if (ApprovalController.has({ id: transaction?.id })) { + ApprovalController.reject( + transaction?.id, ethErrors.provider.userRejectedRequest(), ); } @@ -178,17 +178,21 @@ class Approval extends PureComponent { try { if (appState !== 'active') { const { transaction, transactions } = this.props; + const { ApprovalController } = Engine.context; const currentTransaction = transactions.find( (tx) => tx.id === transaction.id, ); - transaction && - transaction.id && - this.isTxStatusCancellable(currentTransaction) && - Engine.context.ApprovalController.reject( + if ( + transaction?.id && + ApprovalController.has({ id: transaction?.id }) && + this.isTxStatusCancellable(currentTransaction) + ) { + ApprovalController.reject( transaction.id, ethErrors.provider.userRejectedRequest(), ); + } this.props.hideModal(); } } catch (e) { diff --git a/app/components/Views/SendFlow/AddressFrom/AddressFrom.tsx b/app/components/Views/SendFlow/AddressFrom/AddressFrom.tsx index 3c89e535dc1..d593ee98b5c 100644 --- a/app/components/Views/SendFlow/AddressFrom/AddressFrom.tsx +++ b/app/components/Views/SendFlow/AddressFrom/AddressFrom.tsx @@ -25,6 +25,7 @@ import { SFAddressFromProps } from './AddressFrom.types'; const SendFlowAddressFrom = ({ fromAccountBalanceState, + setFromAddress, }: SFAddressFromProps) => { const navigation = useNavigation(); const identities = useSelector(selectIdentities); @@ -106,6 +107,7 @@ const SendFlowAddressFrom = ({ setAccountName(accName); setAccountBalance(balance); fromAccountBalanceState(balanceIsZero); + setFromAddress(address); }; const openAccountSelector = () => { diff --git a/app/components/Views/SendFlow/AddressFrom/AddressFrom.types.ts b/app/components/Views/SendFlow/AddressFrom/AddressFrom.types.ts index 2f05a877ae2..fbd8d26a291 100644 --- a/app/components/Views/SendFlow/AddressFrom/AddressFrom.types.ts +++ b/app/components/Views/SendFlow/AddressFrom/AddressFrom.types.ts @@ -1,3 +1,4 @@ export interface SFAddressFromProps { fromAccountBalanceState: (value: boolean) => void; + setFromAddress: (address: string) => void; } diff --git a/app/components/Views/SendFlow/SendTo/index.js b/app/components/Views/SendFlow/SendTo/index.js index 43898fa93d2..bd4d64294c6 100644 --- a/app/components/Views/SendFlow/SendTo/index.js +++ b/app/components/Views/SendFlow/SendTo/index.js @@ -369,6 +369,10 @@ class SendFlow extends PureComponent { this.setState({ balanceIsZero: value }); }; + setFromAddress = (address) => { + this.setState({ fromSelectedAddress: address }); + }; + getAddressNameFromBookOrIdentities = (toAccount) => { const { addressBook, identities, network } = this.props; if (!toAccount) return; @@ -489,6 +493,7 @@ class SendFlow extends PureComponent { { - await AccountListView.tapAddAccountButton(); - - await AccountListView.tapImportAccountButton(); + await ConnectModal.tapImportAccountOrHWButton(); + await AddAccountModal.tapImportAccount(); await ImportAccountView.isVisible(); await ImportAccountView.enterPrivateKey(accountPrivateKey.keys); await ImportAccountView.isImportSuccessSreenVisible(); diff --git a/ios/MetaMask.xcodeproj/project.pbxproj b/ios/MetaMask.xcodeproj/project.pbxproj index 74c337482da..30d4b026dea 100644 --- a/ios/MetaMask.xcodeproj/project.pbxproj +++ b/ios/MetaMask.xcodeproj/project.pbxproj @@ -1039,7 +1039,7 @@ CODE_SIGN_ENTITLEMENTS = MetaMask/MetaMaskDebug.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1156; + CURRENT_PROJECT_VERSION = 1159; DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = 48XVW22RCG; @@ -1073,7 +1073,7 @@ ); LIBRARY_SEARCH_PATHS = "$(inherited)"; LLVM_LTO = YES; - MARKETING_VERSION = 7.3.1; + MARKETING_VERSION = 7.4.0; ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = ( "$(inherited)", @@ -1105,7 +1105,7 @@ CODE_SIGN_ENTITLEMENTS = MetaMask/MetaMask.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1156; + CURRENT_PROJECT_VERSION = 1159; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = 48XVW22RCG; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 48XVW22RCG; @@ -1139,7 +1139,7 @@ ); LIBRARY_SEARCH_PATHS = "$(inherited)"; LLVM_LTO = YES; - MARKETING_VERSION = 7.3.1; + MARKETING_VERSION = 7.4.0; ONLY_ACTIVE_ARCH = NO; OTHER_CFLAGS = ( "$(inherited)", @@ -1251,7 +1251,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1156; + CURRENT_PROJECT_VERSION = 1159; DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = 48XVW22RCG; @@ -1288,7 +1288,7 @@ "\"$(SRCROOT)/MetaMask/System/Library/Frameworks\"", ); LLVM_LTO = YES; - MARKETING_VERSION = 7.3.1; + MARKETING_VERSION = 7.4.0; ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = ( "$(inherited)", @@ -1320,7 +1320,7 @@ CODE_SIGN_ENTITLEMENTS = MetaMask/MetaMask.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1156; + CURRENT_PROJECT_VERSION = 1159; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = 48XVW22RCG; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 48XVW22RCG; @@ -1357,7 +1357,7 @@ "\"$(SRCROOT)/MetaMask/System/Library/Frameworks\"", ); LLVM_LTO = YES; - MARKETING_VERSION = 7.3.1; + MARKETING_VERSION = 7.4.0; ONLY_ACTIVE_ARCH = NO; OTHER_CFLAGS = ( "$(inherited)", diff --git a/ios/Podfile b/ios/Podfile index c16dfd242a5..1abfef98521 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -79,6 +79,7 @@ def common_target_logic # Pods for MetaMask pod 'React-RCTPushNotification', :path => '../node_modules/react-native/Libraries/PushNotificationIOS' + pod 'ReactNativePayments', :path => '../node_modules/@exodus/react-native-payments/lib/ios/' end target 'MetaMask' do diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 98af0a9b259..6c58eb29f0b 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -450,6 +450,8 @@ PODS: - React-jsi (= 0.71.6) - React-logger (= 0.71.6) - React-perflogger (= 0.71.6) + - ReactNativePayments (1.5.0): + - React - rn-fetch-blob (0.12.0): - React-Core - RNCAsyncStorage (1.17.10): @@ -614,6 +616,7 @@ DEPENDENCIES: - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) - React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`) - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) + - "ReactNativePayments (from `../node_modules/@exodus/react-native-payments/lib/ios/`)" - rn-fetch-blob (from `../node_modules/rn-fetch-blob`) - "RNCAsyncStorage (from `../node_modules/@react-native-async-storage/async-storage`)" - "RNCCheckbox (from `../node_modules/@react-native-community/checkbox`)" @@ -771,6 +774,8 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/runtimeexecutor" ReactCommon: :path: "../node_modules/react-native/ReactCommon" + ReactNativePayments: + :path: "../node_modules/@exodus/react-native-payments/lib/ios/" rn-fetch-blob: :path: "../node_modules/rn-fetch-blob" RNCAsyncStorage: @@ -892,6 +897,7 @@ SPEC CHECKSUMS: React-RCTVibration: 73d201599a64ea14b4e0b8f91b64970979fd92e6 React-runtimeexecutor: 8692ac548bec648fa121980ccb4304afd136d584 ReactCommon: e1067159764444e5db7c14e294d5cd79fb159c59 + ReactNativePayments: a4e3ac915256a4e759c8a04338b558494a63a0f5 rn-fetch-blob: f065bb7ab7fb48dd002629f8bdcb0336602d3cba RNCAsyncStorage: 0c357f3156fcb16c8589ede67cc036330b6698ca RNCCheckbox: ed1b4ca295475b41e7251ebae046360a703b6eb5 @@ -922,6 +928,6 @@ SPEC CHECKSUMS: Yoga: ba09b6b11e6139e3df8229238aa794205ca6a02a YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: 8af07a0374b01755391378e42ef086ec6c9752a9 +PODFILE CHECKSUM: 8d3adf4eeb9c38c94e164bf39d459809e3147413 COCOAPODS: 1.12.1 diff --git a/package.json b/package.json index 636adca9bc2..3ad49bc163a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "metamask", - "version": "7.3.1", + "version": "7.4.0", "private": true, "scripts": { "audit:ci": "./scripts/yarn-audit.sh",