Skip to content

Commit

Permalink
7.4.0 (#6806)
Browse files Browse the repository at this point in the history
* 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 <iamsylvaelendu@gmail.com>

* 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 <metamaskbot@users.noreply.github.com>
Co-authored-by: sethkfman <Seth.Kaufman@consensys.net>
Co-authored-by: Pedro Pablo Aste Kompen <wachunei@gmail.com>
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 <iamsylvaelendu@gmail.com>
Co-authored-by: Vinicius Stevam <45455812+vinistevam@users.noreply.github.com>
Co-authored-by: Chris Wilcox <chris.wilcox@consensys.net>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
9 people authored Jul 28, 2023
1 parent 5258fe9 commit 4f5141a
Show file tree
Hide file tree
Showing 15 changed files with 97 additions and 28 deletions.
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

## 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

Expand Down
6 changes: 3 additions & 3 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
20 changes: 12 additions & 8 deletions app/components/Views/Approval/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
);
}
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 2 additions & 0 deletions app/components/Views/SendFlow/AddressFrom/AddressFrom.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { SFAddressFromProps } from './AddressFrom.types';

const SendFlowAddressFrom = ({
fromAccountBalanceState,
setFromAddress,
}: SFAddressFromProps) => {
const navigation = useNavigation();
const identities = useSelector(selectIdentities);
Expand Down Expand Up @@ -106,6 +107,7 @@ const SendFlowAddressFrom = ({
setAccountName(accName);
setAccountBalance(balance);
fromAccountBalanceState(balanceIsZero);
setFromAddress(address);
};

const openAccountSelector = () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export interface SFAddressFromProps {
fromAccountBalanceState: (value: boolean) => void;
setFromAddress: (address: string) => void;
}
5 changes: 5 additions & 0 deletions app/components/Views/SendFlow/SendTo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -489,6 +493,7 @@ class SendFlow extends PureComponent {
<View style={styles.imputWrapper}>
<SendFlowAddressFrom
fromAccountBalanceState={this.fromAccountBalanceState}
setFromAddress={this.setFromAddress}
/>
<SendFlowAddressTo
inputRef={this.addressToInputRef}
Expand Down
4 changes: 2 additions & 2 deletions bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -735,10 +735,10 @@ app:
PROJECT_LOCATION_IOS: ios
- opts:
is_expand: false
VERSION_NAME: 7.3.1
VERSION_NAME: 7.4.0
- opts:
is_expand: false
VERSION_NUMBER: 1156
VERSION_NUMBER: 1159
- opts:
is_expand: false
ANDROID_APK_LINK: ''
Expand Down
8 changes: 7 additions & 1 deletion e2e/pages/modals/AddAccountModal.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
import TestHelpers from '../../helpers';
import { ADD_ACCOUNT_NEW_ACCOUNT_BUTTON } from '../../../wdio/screen-objects/testIDs/Components/AddAccountModal.testIds';
import {
ADD_ACCOUNT_NEW_ACCOUNT_BUTTON,
ADD_ACCOUNT_IMPORT_ACCOUNT_BUTTON,
} from '../../../wdio/screen-objects/testIDs/Components/AddAccountModal.testIds';

export default class AddAccountModal {
static async tapAddNewAccount() {
await TestHelpers.waitAndTap(ADD_ACCOUNT_NEW_ACCOUNT_BUTTON);
}
static async tapImportAccount() {
await TestHelpers.waitAndTap(ADD_ACCOUNT_IMPORT_ACCOUNT_BUTTON);
}
}
11 changes: 11 additions & 0 deletions e2e/pages/modals/ConnectModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import messages from '../../../locales/languages/en.json';
const CONNECT_MULTIPLE_ACCOUNTS_STRING =
messages.accounts.connect_multiple_accounts;

const CONNECT_MULTIPLE_ACCOUNTS_IMPORT_ACCOUNT_TEXT =
messages.account_actions.add_account_or_hardware_wallet;

const SELECT_ALL_TEXT = messages.accounts.select_all;

export default class ConnectModal {
Expand All @@ -24,6 +27,14 @@ export default class ConnectModal {
await TestHelpers.tapByText(CONNECT_MULTIPLE_ACCOUNTS_STRING);
}

static async tapImportAccountButton() {
await TestHelpers.tapByText(CONNECT_MULTIPLE_ACCOUNTS_IMPORT_ACCOUNT_TEXT);
}

static async tapImportAccountOrHWButton() {
await TestHelpers.tapByText(CONNECT_MULTIPLE_ACCOUNTS_IMPORT_ACCOUNT_TEXT);
}

static async tapSelectAllButton() {
await TestHelpers.tapByText(SELECT_ALL_TEXT);
}
Expand Down
8 changes: 7 additions & 1 deletion e2e/pages/modals/ConnectedAccountsModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@ export default class ConnectedAccountsModal {
}

static async tapToSetAsPrimaryAccount() {
await TestHelpers.tapItemAtIndex(CELL_SELECT_TEST_ID, 1); // selecting the second account on the list
// await TestHelpers.delay(8000);
if (device.getPlatform() === 'android') {
await TestHelpers.tapByText(messages.accounts.imported); //does not work for iOS
} else {
await TestHelpers.typeTextAndHideKeyboard(CELL_SELECT_TEST_ID, 1); //not working for android or iOS
}
await TestHelpers.delay(8000); //waiting for toast message to move out of the way
}

static async isVisible() {
Expand Down
6 changes: 3 additions & 3 deletions e2e/specs/permission-system-removing-imported-account.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import NetworkEducationModal from '../pages/modals/NetworkEducationModal';
import Accounts from '../../wdio/helpers/Accounts';

import { importWalletWithRecoveryPhrase } from '../viewHelper';
import AddAccountModal from '../pages/modals/AddAccountModal';

const SEPOLIA = 'Sepolia Test Network';

Expand Down Expand Up @@ -50,9 +51,8 @@ describe(
});

it('should import account', async () => {
await AccountListView.tapAddAccountButton();

await AccountListView.tapImportAccountButton();
await ConnectModal.tapImportAccountOrHWButton();
await AddAccountModal.tapImportAccount();
await ImportAccountView.isVisible();
await ImportAccountView.enterPrivateKey(accountPrivateKey.keys);
await ImportAccountView.isImportSuccessSreenVisible();
Expand Down
16 changes: 8 additions & 8 deletions ios/MetaMask.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)",
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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)",
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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)",
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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)",
Expand Down
1 change: 1 addition & 0 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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`)"
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -892,6 +897,7 @@ SPEC CHECKSUMS:
React-RCTVibration: 73d201599a64ea14b4e0b8f91b64970979fd92e6
React-runtimeexecutor: 8692ac548bec648fa121980ccb4304afd136d584
ReactCommon: e1067159764444e5db7c14e294d5cd79fb159c59
ReactNativePayments: a4e3ac915256a4e759c8a04338b558494a63a0f5
rn-fetch-blob: f065bb7ab7fb48dd002629f8bdcb0336602d3cba
RNCAsyncStorage: 0c357f3156fcb16c8589ede67cc036330b6698ca
RNCCheckbox: ed1b4ca295475b41e7251ebae046360a703b6eb5
Expand Down Expand Up @@ -922,6 +928,6 @@ SPEC CHECKSUMS:
Yoga: ba09b6b11e6139e3df8229238aa794205ca6a02a
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

PODFILE CHECKSUM: 8af07a0374b01755391378e42ef086ec6c9752a9
PODFILE CHECKSUM: 8d3adf4eeb9c38c94e164bf39d459809e3147413

COCOAPODS: 1.12.1
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "metamask",
"version": "7.3.1",
"version": "7.4.0",
"private": true,
"scripts": {
"audit:ci": "./scripts/yarn-audit.sh",
Expand Down

0 comments on commit 4f5141a

Please sign in to comment.