Skip to content

Commit

Permalink
feat: 7.31.0 (#11093)
Browse files Browse the repository at this point in the history
This is the release candidate for version 7.31.0. The changelog will be
found in another PR chore/7.31.0-Changelog.

---------

Co-authored-by: metamaskbot <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: sethkfman <[email protected]>
Co-authored-by: runway-github[bot] <73448015+runway-github[bot]@users.noreply.github.com>
Co-authored-by: tommasini <[email protected]>
Co-authored-by: Xiaoming Wang <[email protected]>
Co-authored-by: Nico MASSART <[email protected]>
Co-authored-by: Vivek <[email protected]>
Co-authored-by: Xiaoming Wang <[email protected]>
Co-authored-by: Nick Gambino <[email protected]>
Co-authored-by: Aslau Mario-Daniel <[email protected]>
Co-authored-by: Matthew Walsh <[email protected]>
Co-authored-by: sahar-fehri <[email protected]>
Co-authored-by: Frank von Hoven <[email protected]>
Co-authored-by: Cal-L <[email protected]>
  • Loading branch information
15 people authored Sep 19, 2024
1 parent 0eb8076 commit bc7acce
Show file tree
Hide file tree
Showing 15 changed files with 13,288 additions and 12,383 deletions.
99 changes: 99 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,105 @@

## Current Main Branch

## 7.31.0 - Sep 6, 2024
### Added
- [#10747](https://github.com/MetaMask/metamask-mobile/pull/10747): feat: 2805 grant permission to network with missmatching rpc url (#10747)
- [#10715](https://github.com/MetaMask/metamask-mobile/pull/10715): feat: 2795 disconnect all account permission multichain edit account screen (#10715)
- [#10347](https://github.com/MetaMask/metamask-mobile/pull/10347): feat: refactor WalletConnect v2 and add unit tests (#10347)
- [#10695](https://github.com/MetaMask/metamask-mobile/pull/10695): feat: sdk async key exchange (#10695)
- [#10562](https://github.com/MetaMask/metamask-mobile/pull/10562): feat: New token detail view (#10562)
- [#10876](https://github.com/MetaMask/metamask-mobile/pull/10876): feat: js bundle size ci gate (#10876)
- [#10847](https://github.com/MetaMask/metamask-mobile/pull/10847): feat: add pooled staking feature flag (#10847)
- [#2796](https://github.com/MetaMask/metamask-mobile/pull/2796): feat(2796): permission settings for multichain
- [#10727](https://github.com/MetaMask/metamask-mobile/pull/10727): feat: add ledger live deviation path support (#10727)

### Changed
- [#10749](https://github.com/MetaMask/metamask-mobile/pull/10749): chore(deps): bump rexml from 3.3.3 to 3.3.6 in the bundler group across 1 directory (#10749)
- [#10794](https://github.com/MetaMask/metamask-mobile/pull/10794): Release-update-BS-URL (#10794)
- [#11088](https://github.com/MetaMask/metamask-mobile/pull/11088): chore: add new track events for enabling/disabling basic functionality (#11088)
- [#10781](https://github.com/MetaMask/metamask-mobile/pull/10781): chore: update gitignore (#10781)
- [#11080](https://github.com/MetaMask/metamask-mobile/pull/11080): chore: fix flipper pod compilation with pika 15.3 toolchain (#11080)
- [#11077](https://github.com/MetaMask/metamask-mobile/pull/11077): chore: disable api spec pipeline (#11077)
- [#11075](https://github.com/MetaMask/metamask-mobile/pull/11075): test: disable flakey accounts test (#11075)
- [#11074](https://github.com/MetaMask/metamask-mobile/pull/11074): test: set baseline for app launch times (#11074)
- [#11039](https://github.com/MetaMask/metamask-mobile/pull/11039): test: Update swap test to handle the details modal (#11039)
- [#11070](https://github.com/MetaMask/metamask-mobile/pull/11070): test: remove duplicate push_branch in trigger map (#11070)
- [#11037](https://github.com/MetaMask/metamask-mobile/pull/11037): test: enable launch times pipeline on main (#11037)
- [#10983](https://github.com/MetaMask/metamask-mobile/pull/10983): chore: Metrics on download logs on login screen (#10983)
- [#11012](https://github.com/MetaMask/metamask-mobile/pull/11012): chore: revert splash screen PR (#11012)
- [#11003](https://github.com/MetaMask/metamask-mobile/pull/11003): chore: update swaps controller to 9.0.12 (#11003)
- [#11000](https://github.com/MetaMask/metamask-mobile/pull/11000): chore: merge release 7.29.1 into main (#11000)
- [#10937](https://github.com/MetaMask/metamask-mobile/pull/10937): chore: remove prefer default export eslint rule (#10937)
- [#10958](https://github.com/MetaMask/metamask-mobile/pull/10958): test: Increase cold start bench marks (#10958)
- [#10908](https://github.com/MetaMask/metamask-mobile/pull/10908): chore: Cherry pick reCaptcha fix (#10908)
- [#10016](https://github.com/MetaMask/metamask-mobile/pull/10016): chore: Update Keystone and NGRAVE dependencies (#10016)
- [#10866](https://github.com/MetaMask/metamask-mobile/pull/10866): chore: update typescript version to v~5.4.5 (#10866)
- [#10745](https://github.com/MetaMask/metamask-mobile/pull/10745): chore: Enable typescript coverage for all the files (#10745)
- [#10830](https://github.com/MetaMask/metamask-mobile/pull/10830): chore: Bump old pod checksums (#10830)
- [#10835](https://github.com/MetaMask/metamask-mobile/pull/10835): test: Remove Redundant Steps in WDIO to Fix Upgrade Test Failures (#10835)
- [#10813](https://github.com/MetaMask/metamask-mobile/pull/10813): chore: Remove react-native-splash-screen from Android (#10813)
- [#10828](https://github.com/MetaMask/metamask-mobile/pull/10828): chore: Add troubleshoot for missing simulators (#10828)
- [#10736](https://github.com/MetaMask/metamask-mobile/pull/10736): chore: Update permission controller to v^11 & utils to v^9 (#10736)
- [#10814](https://github.com/MetaMask/metamask-mobile/pull/10814): test:update-bs-url-to-correct-url (#10814)
- [#10744](https://github.com/MetaMask/metamask-mobile/pull/10744): chore: typescript coverage (#10744)
- [#10785](https://github.com/MetaMask/metamask-mobile/pull/10785): test: Refactor swaps page object files (#10785)
- [#10723](https://github.com/MetaMask/metamask-mobile/pull/10723): docs: Clean up testing readme (#10723)
- [#10751](https://github.com/MetaMask/metamask-mobile/pull/10751): chore: chore/7.30.0-Changelog (#10751)
- [#11017](https://github.com/MetaMask/metamask-mobile/pull/11017): refactor: updated button primary to use light theme colors (#11017)
- [#11018](https://github.com/MetaMask/metamask-mobile/pull/11018): refactor: updated wallet action icons to be light themed (#11018)
- [#10325](https://github.com/MetaMask/metamask-mobile/pull/10325): chore: updated avatargroup to take in all avatars (#10325)
- [#10616](https://github.com/MetaMask/metamask-mobile/pull/10616): chore: upgrade network controller to version 19.0.0 (#10616)
- [#11001](https://github.com/MetaMask/metamask-mobile/pull/11001): test: Fix swap smoke tests (#11001)
- [#10953](https://github.com/MetaMask/metamask-mobile/pull/10953): test: replaced TestHelpers function call with equivalent from Assertions (#10953)
- [#10897](https://github.com/MetaMask/metamask-mobile/pull/10897): test: Fix Swap e2e test failure (#10897)
- [#10874](https://github.com/MetaMask/metamask-mobile/pull/10874): chore: add new `keyring-snaps` code fence (#10874)
- [#10913](https://github.com/MetaMask/metamask-mobile/pull/10913): test: e2e srp reveal regression update (#10913)
- [#10879](https://github.com/MetaMask/metamask-mobile/pull/10879): test: e2e to reveal private key (#10879)
- [#10754](https://github.com/MetaMask/metamask-mobile/pull/10754): test: complete quiz to reveal SRP (#10754)
- [#10871](https://github.com/MetaMask/metamask-mobile/pull/10871): chore: enable merge queues gh action test run (#10871)
- [#10714](https://github.com/MetaMask/metamask-mobile/pull/10714): test: Refactor AccountListView Page object (#10714)

### Fixed
- [#10518](https://github.com/MetaMask/metamask-mobile/pull/10518): fix: refactor blockaid utils sync functions to async (#10518)
- [#11020](https://github.com/MetaMask/metamask-mobile/pull/11020): fix: Fix broken unit test in `Sendflow` tests (#11020)
- [#10385](https://github.com/MetaMask/metamask-mobile/pull/10385): fix: no insufficient funds warning (#10385)
- [#10826](https://github.com/MetaMask/metamask-mobile/pull/10826): fix: Upgrading Appium test failing (#10826)
- [#9910](https://github.com/MetaMask/metamask-mobile/pull/9910): fix: refactor saga xhr injection and add unit tests (#9910)
- [#10850](https://github.com/MetaMask/metamask-mobile/pull/10850): fix: remove exclusion of micromatch advisory and bump it (#10850)
- [#10673](https://github.com/MetaMask/metamask-mobile/pull/10673): fix: camera permission alert with settings access (#10673)
- [#10851](https://github.com/MetaMask/metamask-mobile/pull/10851): fix(2795): remove duplicate description in account connect multiselect screen (#10851)
- [#10894](https://github.com/MetaMask/metamask-mobile/pull/10894): fix: browser tab url type (#10894)
- [#10963](https://github.com/MetaMask/metamask-mobile/pull/10963): fix: Update PRODUCTION_APP_URL value (#10963)
- [#10903](https://github.com/MetaMask/metamask-mobile/pull/10903): fix(bug report): the description of bug report issue wasn't up-to-date anymore (#10903)
- [#10886](https://github.com/MetaMask/metamask-mobile/pull/10886): fix: recaptcha on in app browser (#10886)
- [#10540](https://github.com/MetaMask/metamask-mobile/pull/10540): fix: Browser dialog prompts in app (#10540)
- [#10844](https://github.com/MetaMask/metamask-mobile/pull/10844): fix: Refactor `yarn setup` in CI to generate terms of use content while retaining performance optimization (#10844)
- [#10845](https://github.com/MetaMask/metamask-mobile/pull/10845): fix: Add missing react-native-slider to pod lock file (#10845)
- [#10843](https://github.com/MetaMask/metamask-mobile/pull/10843): "revert: ""fix: Fixed 17 High Priority Issues - SonarCloud"" (#10843)"
- [#10635](https://github.com/MetaMask/metamask-mobile/pull/10635): fix: Fixed 17 High Priority Issues - SonarCloud (#10635)
- [#10827](https://github.com/MetaMask/metamask-mobile/pull/10827): fix: Fix/disable flipper for release (#10827)
- [#10820](https://github.com/MetaMask/metamask-mobile/pull/10820): fix: Set NO_FLIPPER to true on ios release (#10820)
- [#10545](https://github.com/MetaMask/metamask-mobile/pull/10545): fix: update metrics logic (#10545)
- [#10761](https://github.com/MetaMask/metamask-mobile/pull/10761): fix: typescript vs code default version (#10761)
- [#10753](https://github.com/MetaMask/metamask-mobile/pull/10753): fix: Fix coachmark error (#10753)
- [#10979](https://github.com/MetaMask/metamask-mobile/pull/10979): fix: wallet connect invalid hostname (#10979)
- [#10701](https://github.com/MetaMask/metamask-mobile/pull/10701): fix: wrong or missing analytics request source (#10701)
- [#10863](https://github.com/MetaMask/metamask-mobile/pull/10863): fixes: connectWith sdk (#10863)
- [#10729](https://github.com/MetaMask/metamask-mobile/pull/10729): fix: support set custom nonce to zero (#10729)
- [#11002](https://github.com/MetaMask/metamask-mobile/pull/11002): fix: infinite gas fee loading during send (#11002)
- [#10936](https://github.com/MetaMask/metamask-mobile/pull/10936): fix: Add missing allowedAction NetworkController:findNetworkClientIdByChainId to transactionController (#10936)
- [#10965](https://github.com/MetaMask/metamask-mobile/pull/10965): fix: gas never loading during send + high gas fee after deep link (#10965)
- [#10662](https://github.com/MetaMask/metamask-mobile/pull/10662): fix: blockaid loader on confirmation pages (#10662)
- [#10286](https://github.com/MetaMask/metamask-mobile/pull/10286): fix: Add dark mode to storybook (#10286)
- [#9962](https://github.com/MetaMask/metamask-mobile/pull/9962): fix: updated Text to use proper font styles (#9962)
- [#10476](https://github.com/MetaMask/metamask-mobile/pull/10476): fix: fix sentry error (#10476)
- [#10687](https://github.com/MetaMask/metamask-mobile/pull/10687): fix: Optimism quotes failing (#10687)
- [#10900](https://github.com/MetaMask/metamask-mobile/pull/10900): fix(notifications): hide profile sync toggle (#10900)
- [#10791](https://github.com/MetaMask/metamask-mobile/pull/10791): fix: Fix the QR code account unable to sign any message and transaction issue in 7.30.0 (#10791)
- [#10982](https://github.com/MetaMask/metamask-mobile/pull/10982): fix: UI notifications details bugs (#10982)
- [#10795](https://github.com/MetaMask/metamask-mobile/pull/10795): fix: small UI polishings (#10795)
- [#10792](https://github.com/MetaMask/metamask-mobile/pull/10792): fix: refactor notifications utils (#10792)

## 7.30.0 - Sep 6, 2024
### Added
- [#10748](https://github.com/MetaMask/metamask-mobile/pull/10748): feat: Add yarn flipper script (#10748)
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ android {
applicationId "io.metamask"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1410
versionName "7.30.0"
versionCode 1432
versionName "7.31.0"
testBuildType System.getProperty('testBuildType', 'debug')
missingDimensionStrategy 'react-native-camera', 'general'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
15 changes: 6 additions & 9 deletions app/components/Nav/Main/RootRPCMethodsUI.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,12 @@ export const useSwapConfirmedEvent = ({ trackSwaps }) => {
const [transactionMetaIdsForListening, setTransactionMetaIdsForListening] =
useState([]);

const addTransactionMetaIdForListening = useCallback(
(txMetaId) => {
setTransactionMetaIdsForListening((transactionMetaIdsForListening) => [
...transactionMetaIdsForListening,
txMetaId,
]);
},
[],
);
const addTransactionMetaIdForListening = useCallback((txMetaId) => {
setTransactionMetaIdsForListening((transactionMetaIdsForListening) => [
...transactionMetaIdsForListening,
txMetaId,
]);
}, []);
const swapsTransactions = useSwapsTransactions();

useEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ describe('LedgerConfirmationModal', () => {
});

it('renders OpenETHAppStep when app launch confirmation is needed', () => {

jest.useFakeTimers();
(useLedgerBluetooth as jest.Mock).mockReturnValue({
isSendingLedgerCommands: true,
Expand Down
1 change: 0 additions & 1 deletion app/components/UI/LedgerModals/LedgerConfirmationModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ const LedgerConfirmationModal = ({

useEffect(() => {
if (isSendingLedgerCommands && !delayClose && !completeClose) {

setDelayClose(true);
setTimeout(() => {
setDelayClose(false);
Expand Down
12 changes: 8 additions & 4 deletions app/components/UI/LedgerModals/Steps/SearchingForDeviceStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ import { strings } from '../../../../../locales/i18n';
import { LEDGER_SUPPORT_LINK } from '../../../../constants/urls';
import Device from '../../../../util/device';
import { useAssetFromTheme, useTheme } from '../../../../util/theme';
import Text, { TextVariant } from '../../../../component-library/components/Texts/Text';

import Text, {
TextVariant,
} from '../../../../component-library/components/Texts/Text';
import ledgerConnectDarkImage from '../../../../images/ledger-connect-dark.png';
import ledgerConnectLightImage from '../../../../images/ledger-connect-light.png';
import { SEARCHING_FOR_DEVICE_STEP } from './Steps.constants';
Expand Down Expand Up @@ -53,7 +54,6 @@ const createStyles = (colors: Colors) =>
marginLeft: 20,
marginRight: 20,
color: colors.primary.default,

},
lookingForDeviceContainer: {
flex: 1,
Expand Down Expand Up @@ -131,7 +131,11 @@ const SearchingForDeviceStep = () => {
</Text>
</View>
<TouchableOpacity onPress={handleOpenInstallEthAppInstructions}>
<Text style={styles.howToInstallEthAppText} variant={TextVariant.BodyMD} numberOfLines={2}>
<Text
style={styles.howToInstallEthAppText}
variant={TextVariant.BodyMD}
numberOfLines={2}
>
{strings('ledger.how_to_install_eth_app')}
</Text>
</TouchableOpacity>
Expand Down
42 changes: 21 additions & 21 deletions app/components/UI/Swaps/QuotesView.js
Original file line number Diff line number Diff line change
Expand Up @@ -794,10 +794,7 @@ function SwapsQuotesView({
]);

const updateSwapsTransactions = useCallback(
async (
transactionMeta,
approvalTransactionMetaId,
) => {
async (transactionMeta, approvalTransactionMetaId) => {
const ethQuery = Engine.getGlobalEthQuery();
const blockNumber = await query(ethQuery, 'blockNumber', []);
const currentBlock = await query(ethQuery, 'getBlockByNumber', [
Expand Down Expand Up @@ -946,13 +943,14 @@ function SwapsQuotesView({

await result;

Logger.log(LOG_PREFIX, 'Submitted trade transaction', transactionMeta.id);

updateSwapsTransactions(
transactionMeta,
approvalTransactionMetaId
Logger.log(
LOG_PREFIX,
'Submitted trade transaction',
transactionMeta.id,
);

updateSwapsTransactions(transactionMeta, approvalTransactionMetaId);

setRecipient(selectedAddress);
await addTokenToAssetsController(destinationToken);
await addTokenToAssetsController(sourceToken);
Expand All @@ -975,9 +973,7 @@ function SwapsQuotesView({
);

const handleApprovalTransaction = useCallback(
async (
isHardwareAddress,
) => {
async (isHardwareAddress) => {
try {
resetTransaction();
const { transactionMeta, result } = await addTransaction(
Expand All @@ -994,11 +990,19 @@ function SwapsQuotesView({
},
);

Logger.log(LOG_PREFIX, 'Added approval transaction', transactionMeta.id);
Logger.log(
LOG_PREFIX,
'Added approval transaction',
transactionMeta.id,
);

await result;

Logger.log(LOG_PREFIX, 'Submitted approval transaction', transactionMeta.id);
Logger.log(
LOG_PREFIX,
'Submitted approval transaction',
transactionMeta.id,
);

setRecipient(selectedAddress);

Expand All @@ -1024,9 +1028,7 @@ function SwapsQuotesView({
'TransactionController:transactionConfirmed',
(transactionMeta) => {
if (transactionMeta.status === TransactionStatus.confirmed) {
handleSwapTransaction(
approvalTransactionMetaId
);
handleSwapTransaction(approvalTransactionMetaId);
}
},
(transactionMeta) => transactionMeta.id === transactionId,
Expand All @@ -1048,7 +1050,7 @@ function SwapsQuotesView({
selectedAddress,
setRecipient,
resetTransaction,
shouldUseSmartTransaction
shouldUseSmartTransaction,
],
);

Expand Down Expand Up @@ -1078,9 +1080,7 @@ function SwapsQuotesView({
!shouldUseSmartTransaction ||
(shouldUseSmartTransaction && !approvalTransaction)
) {
await handleSwapTransaction(
approvalTransactionMetaId
);
await handleSwapTransaction(approvalTransactionMetaId);
}

navigation.dangerouslyGetParent()?.pop();
Expand Down
4 changes: 1 addition & 3 deletions app/components/Views/LedgerConnect/Scan.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ import {
BluetoothPermissionErrors,
LedgerCommunicationErrors,
} from '../../../core/Ledger/ledgerErrors';
import SelectOptionSheet, {
ISelectOption,
} from '../../UI/SelectOptionSheet';
import SelectOptionSheet, { ISelectOption } from '../../UI/SelectOptionSheet';

const createStyles = (colors: Colors) =>
StyleSheet.create({
Expand Down
6 changes: 5 additions & 1 deletion app/components/hooks/Ledger/useLedgerBluetooth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,11 @@ function useLedgerBluetooth(deviceId: string): UseLedgerBluetoothHook {
setLedgerError(LedgerCommunicationErrors.LedgerIsLocked);
} else if (e.message.includes('nonce too low')) {
setLedgerError(LedgerCommunicationErrors.NonceTooLow);
} else if (e.message.includes('Please enable Blind signing or Contract data in the Ethereum app Settings')) {
} else if (
e.message.includes(
'Please enable Blind signing or Contract data in the Ethereum app Settings',
)
) {
setLedgerError(LedgerCommunicationErrors.BlindSignError);
} else {
setLedgerError(LedgerCommunicationErrors.UnknownError);
Expand Down
1 change: 0 additions & 1 deletion app/util/lodash/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// TODO: Replace "any" with type
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const isZero = (value: number | any): boolean => {

if (
value?.toString &&
(value?.toString?.() === '0' || value?.toString?.() === '0x0')
Expand Down
3 changes: 2 additions & 1 deletion app/util/smart-transactions/smart-publish-hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,8 @@ class SmartTransactionHook {
// @ts-expect-error This is not defined on the type, but is a field added in app/components/UI/Swaps/QuotesView.js
this.#transactionController.state.swapsTransactions || {};

const originalSwapsTransaction = swapsTransactions[this.#transactionMeta.id];
const originalSwapsTransaction =
swapsTransactions[this.#transactionMeta.id];

addSwapsTransaction(uuid, originalSwapsTransaction);
};
Expand Down
Loading

0 comments on commit bc7acce

Please sign in to comment.