Skip to content

Commit 9dea288

Browse files
Merge branch 'main' into fix/update-focus-outline-menu-item
2 parents 7fdc4f0 + d5cd7fd commit 9dea288

File tree

162 files changed

+9375
-3768
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+9375
-3768
lines changed

.storybook/test-data.js

+17-7
Original file line numberDiff line numberDiff line change
@@ -1424,17 +1424,27 @@ const state = {
14241424
subjects: {
14251425
'https://app.uniswap.org': {
14261426
permissions: {
1427-
eth_accounts: {
1428-
invoker: 'https://app.uniswap.org',
1429-
parentCapability: 'eth_accounts',
1430-
id: 'a7342e4b-beae-4525-a36c-c0635fd03359',
1431-
date: 1620710693178,
1427+
'endowment:caip25': {
14321428
caveats: [
14331429
{
1434-
type: 'restrictReturnedAccounts',
1435-
value: ['0x64a845a5b02460acf8a3d84503b0d68d028b4bb4'],
1430+
type: 'authorizedScopes',
1431+
value: {
1432+
requiredScopes: {},
1433+
optionalScopes: {
1434+
'eip155:1': {
1435+
accounts: [
1436+
'eip155:1:0x64a845a5b02460acf8a3d84503b0d68d028b4bb4',
1437+
],
1438+
},
1439+
},
1440+
isMultichainOrigin: false,
1441+
},
14361442
},
14371443
],
1444+
invoker: 'https://app.uniswap.org',
1445+
id: 'a7342e4b-beae-4525-a36c-c0635fd03359',
1446+
date: 1620710693178,
1447+
parentCapability: 'endowment:caip25',
14381448
},
14391449
},
14401450
},

.vscode/cspell.json

+2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"FONTCONFIG",
5151
"hardfork",
5252
"hexstring",
53+
"Interactable",
5354
"jazzicon",
5455
"keccak",
5556
"lavadome",
@@ -69,6 +70,7 @@
6970
"pipefail",
7071
"quickstart",
7172
"recompiles",
73+
"retryable",
7274
"shellcheck",
7375
"SIWE",
7476
"sourcemaps",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/lib/index.js b/lib/index.js
2+
index f5795884311124b221d91f488ed45750eb6e9c80..e030d6f8d8e85e6d1350c565d36ad48bc49af881 100644
3+
--- a/lib/index.js
4+
+++ b/lib/index.js
5+
@@ -25,7 +25,7 @@ class Ptr {
6+
});
7+
return `/${tokens.join("/")}`;
8+
}
9+
- eval(instance) {
10+
+ shmeval(instance) {
11+
for (const token of this.tokens) {
12+
if (instance.hasOwnProperty(token)) {
13+
instance = instance[token];
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/build/resolve-pointer.js b/build/resolve-pointer.js
2+
index d5a8ec7486250cd17572eb0e0449725643fc9842..044e74bb51a46e9bf3547f6d7a84763b93260613 100644
3+
--- a/build/resolve-pointer.js
4+
+++ b/build/resolve-pointer.js
5+
@@ -27,7 +27,7 @@ exports.default = (function (ref, root) {
6+
try {
7+
var withoutHash = ref.replace("#", "");
8+
var pointer = json_pointer_1.default.parse(withoutHash);
9+
- return pointer.eval(root);
10+
+ return pointer.shmeval(root);
11+
}
12+
catch (e) {
13+
throw new InvalidJsonPointerRefError(ref, e.message);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
diff --git a/dist/assetsUtil.cjs b/dist/assetsUtil.cjs
2+
index 61246f51500c8cab48f18296a73629fb73454caa..34396ba143e3ebcb04fa2c80f7a35d1abd06710e 100644
3+
--- a/dist/assetsUtil.cjs
4+
+++ b/dist/assetsUtil.cjs
5+
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
6+
};
7+
Object.defineProperty(exports, "__esModule", { value: true });
8+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }
9+
-exports.fetchTokenContractExchangeRates = exports.reduceInBatchesSerially = exports.divideIntoBatches = exports.ethersBigNumberToBN = exports.addUrlProtocolPrefix = exports.getFormattedIpfsUrl = exports.getIpfsCIDv1AndPath = exports.removeIpfsProtocolPrefix = exports.isTokenListSupportedForNetwork = exports.isTokenDetectionSupportedForNetwork = exports.SupportedStakedBalanceNetworks = exports.SupportedTokenDetectionNetworks = exports.formatIconUrlWithProxy = exports.formatAggregatorNames = exports.hasNewCollectionFields = exports.compareNftMetadata = exports.TOKEN_PRICES_BATCH_SIZE = void 0;
10+
+exports.getKeyByValue = exports.fetchTokenContractExchangeRates = exports.reduceInBatchesSerially = exports.divideIntoBatches = exports.ethersBigNumberToBN = exports.addUrlProtocolPrefix = exports.getFormattedIpfsUrl = exports.getIpfsCIDv1AndPath = exports.removeIpfsProtocolPrefix = exports.isTokenListSupportedForNetwork = exports.isTokenDetectionSupportedForNetwork = exports.SupportedStakedBalanceNetworks = exports.SupportedTokenDetectionNetworks = exports.formatIconUrlWithProxy = exports.formatAggregatorNames = exports.hasNewCollectionFields = exports.compareNftMetadata = exports.TOKEN_PRICES_BATCH_SIZE = void 0;
11+
const controller_utils_1 = require("@metamask/controller-utils");
12+
const utils_1 = require("@metamask/utils");
13+
const bn_js_1 = __importDefault(require("bn.js"));
14+
@@ -368,4 +368,19 @@ async function fetchTokenContractExchangeRates({ tokenPricesService, nativeCurre
15+
}, {});
16+
}
17+
exports.fetchTokenContractExchangeRates = fetchTokenContractExchangeRates;
18+
+/**
19+
+ * Function to search for a specific value in a given map and return the key
20+
+ * @param map - map input to search value
21+
+ * @param value - the value to search for
22+
+ * @returns returns key that corresponds to the value
23+
+ */
24+
+function getKeyByValue(map, value) {
25+
+ for (const [key, val] of map.entries()) {
26+
+ if (val === value) {
27+
+ return key;
28+
+ }
29+
+ }
30+
+ return null; // Return null if no match is found
31+
+}
32+
+exports.getKeyByValue = getKeyByValue;
33+
//# sourceMappingURL=assetsUtil.cjs.map
34+
\ No newline at end of file
35+
diff --git a/dist/assetsUtil.mjs b/dist/assetsUtil.mjs
36+
index 1e14797c8e1cd48e75287b37c29eb6065daac5e6..c288b56227bd7779982083be4cae9674d01ae1dd 100644
37+
--- a/dist/assetsUtil.mjs
38+
+++ b/dist/assetsUtil.mjs
39+
@@ -354,4 +354,18 @@ export async function fetchTokenContractExchangeRates({ tokenPricesService, nati
40+
};
41+
}, {});
42+
}
43+
+/**
44+
+ * Function to search for a specific value in a given map and return the key
45+
+ * @param map - map input to search value
46+
+ * @param value - the value to search for
47+
+ * @returns returns key that corresponds to the value
48+
+ */
49+
+export function getKeyByValue(map, value) {
50+
+ for (const [key, val] of map.entries()) {
51+
+ if (val === value) {
52+
+ return key;
53+
+ }
54+
+ }
55+
+ return null; // Return null if no match is found
56+
+}
57+
//# sourceMappingURL=assetsUtil.mjs.map
58+
\ No newline at end of file
59+
diff --git a/dist/crypto-compare-service/crypto-compare.cjs b/dist/crypto-compare-service/crypto-compare.cjs
60+
index 4cdf9c15053fb4acbc8aa7cade912e87c7aaf224..7bddcf4322f7825affdf34116778ba08b7676951 100644
61+
--- a/dist/crypto-compare-service/crypto-compare.cjs
62+
+++ b/dist/crypto-compare-service/crypto-compare.cjs
63+
@@ -2,6 +2,7 @@
64+
Object.defineProperty(exports, "__esModule", { value: true });
65+
exports.fetchMultiExchangeRate = exports.fetchExchangeRate = void 0;
66+
const controller_utils_1 = require("@metamask/controller-utils");
67+
+const assetsUtil_1 = require("../assetsUtil.cjs");
68+
/**
69+
* A map from native currency symbol to CryptoCompare identifier.
70+
* This is only needed when the values don't match.
71+
@@ -105,12 +106,14 @@ exports.fetchExchangeRate = fetchExchangeRate;
72+
* @returns Promise resolving to exchange rates for given currencies.
73+
*/
74+
async function fetchMultiExchangeRate(fiatCurrency, cryptocurrencies, includeUSDRate) {
75+
- const url = getMultiPricingURL(cryptocurrencies, [fiatCurrency], includeUSDRate);
76+
+ const fsyms = cryptocurrencies.map((nativeCurrency) => nativeSymbolOverrides.get(nativeCurrency) ?? nativeCurrency);
77+
+ const url = getMultiPricingURL(fsyms, [fiatCurrency], includeUSDRate);
78+
const response = await (0, controller_utils_1.handleFetch)(url);
79+
handleErrorResponse(response);
80+
const rates = {};
81+
for (const [cryptocurrency, values] of Object.entries(response)) {
82+
- rates[cryptocurrency.toLowerCase()] = {
83+
+ const key = (0, assetsUtil_1.getKeyByValue)(nativeSymbolOverrides, cryptocurrency);
84+
+ rates[key?.toLowerCase() ?? cryptocurrency.toLowerCase()] = {
85+
[fiatCurrency.toLowerCase()]: values[fiatCurrency.toUpperCase()],
86+
...(includeUSDRate && { usd: values.USD }),
87+
};
88+
diff --git a/dist/crypto-compare-service/crypto-compare.mjs b/dist/crypto-compare-service/crypto-compare.mjs
89+
index 58db2280159669c1b48fb94a9164b8e0be2850a7..74e0560718d42202e9183ff7ff1bfdac1424506e 100644
90+
--- a/dist/crypto-compare-service/crypto-compare.mjs
91+
+++ b/dist/crypto-compare-service/crypto-compare.mjs
92+
@@ -101,12 +101,14 @@ export async function fetchExchangeRate(currency, nativeCurrency, includeUSDRate
93+
* @returns Promise resolving to exchange rates for given currencies.
94+
*/
95+
export async function fetchMultiExchangeRate(fiatCurrency, cryptocurrencies, includeUSDRate) {
96+
- const url = getMultiPricingURL(cryptocurrencies, [fiatCurrency], includeUSDRate);
97+
+ const fsyms = cryptocurrencies.map((nativeCurrency) => nativeSymbolOverrides.get(nativeCurrency) ?? nativeCurrency);
98+
+ const url = getMultiPricingURL(fsyms, [fiatCurrency], includeUSDRate);
99+
const response = await handleFetch(url);
100+
handleErrorResponse(response);
101+
const rates = {};
102+
for (const [cryptocurrency, values] of Object.entries(response)) {
103+
- rates[cryptocurrency.toLowerCase()] = {
104+
+ const key = getKeyByValue(nativeSymbolOverrides, cryptocurrency);
105+
+ rates[key?.toLowerCase() ?? cryptocurrency.toLowerCase()] = {
106+
[fiatCurrency.toLowerCase()]: values[fiatCurrency.toUpperCase()],
107+
...(includeUSDRate && { usd: values.USD }),
108+
};

CHANGELOG.md

+74-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,76 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [12.10.1]
10+
### Changed
11+
- Stop publishing MMI builds to the release page ([#29732](https://github.com/MetaMask/metamask-extension/pull/29732))
12+
13+
## [12.10.0]
14+
### Added
15+
- Added B3 network logo for improved identification ([#27778](https://github.com/MetaMask/metamask-extension/pull/27778))
16+
- Enabled multi-network selection and token address search in the Asset Picker ([#28975](https://github.com/MetaMask/metamask-extension/pull/28975))
17+
- Removed scroll-to-bottom requirement for confirming personal sign requests ([#29053](https://github.com/MetaMask/metamask-extension/pull/29053))
18+
- Added a hyperlink to the pending transaction alert for quick access to documentation ([#28721](https://github.com/MetaMask/metamask-extension/pull/28721))
19+
- Implemented unified confirmation navigation for seamless handling of multiple pending confirmations ([#28761](https://github.com/MetaMask/metamask-extension/pull/28761))
20+
- Upgraded transaction controller to retrieve incoming transactions via the accounts API instead of Etherscan ([#28597](https://github.com/MetaMask/metamask-extension/pull/28597))
21+
- Added expanded view support for Snap notifications ([#27407](https://github.com/MetaMask/metamask-extension/pull/27407))
22+
- Added an info message to clarify redirection when a hardware wallet user declines a transaction during the bridge process ([#29198](https://github.com/MetaMask/metamask-extension/pull/29198))
23+
- Implemented proper routing for failed transactions ([#29158](https://github.com/MetaMask/metamask-extension/pull/29158))
24+
- Added hardware wallet confirmation screen for Bridge transactions ([#29113](https://github.com/MetaMask/metamask-extension/pull/29113))
25+
- Added calculation for max total gas fee ([#29116](https://github.com/MetaMask/metamask-extension/pull/29116))
26+
- Added a banner to notify users to contact Support if a Bridge transaction is delayed ([#28849](https://github.com/MetaMask/metamask-extension/pull/28849))
27+
- Enhanced cross-chain swap support for Smart Transactions (STX) ([#28460](https://github.com/MetaMask/metamask-extension/pull/28460))
28+
- Added UI components for Bridge Transaction Details ([#28657](https://github.com/MetaMask/metamask-extension/pull/28657))
29+
- Introduced a carousel component on the homepage to display up to 5 banners about new changes ([#28956](https://github.com/MetaMask/metamask-extension/pull/28956))
30+
- [FLASK] Enabled Solana feature in Flask build with account creation support in experimental settings ([#29147](https://github.com/MetaMask/metamask-extension/pull/29147))
31+
32+
### Changed
33+
- Redesigned cross-chain swaps UI with updated layout, styling, asset picker, advanced settings, and enhanced quote validation ([#28373](https://github.com/MetaMask/metamask-extension/pull/28373))
34+
- Migrated Base Mainnet RPC to Infura for improved reliability and performance ([#28974](https://github.com/MetaMask/metamask-extension/pull/28974))
35+
- Updated default network avatar style to a rounded square shape positioned at the bottom right of tokens ([#28976](https://github.com/MetaMask/metamask-extension/pull/28976))
36+
- Replaced Spinner component with Preloader component in Snaps ([#29143](https://github.com/MetaMask/metamask-extension/pull/29143))
37+
- Updated Swaps to redirect Bridge links to the native Bridge experience instead of the Portfolio Bridge. ([#29175](https://github.com/MetaMask/metamask-extension/pull/29175))
38+
- Updated Bridge carousel cards to direct users to the in-app Bridge experience instead of the Portfolio ([#29169](https://github.com/MetaMask/metamask-extension/pull/29169))
39+
- Disabled buttons during submission and ensured proper state reset after submission completion ([#29149](https://github.com/MetaMask/metamask-extension/pull/29149))
40+
- Introduced a delay for Linea bridge transactions to improve reliability and reduce flakiness ([#29109](https://github.com/MetaMask/metamask-extension/pull/29109))
41+
- Enhanced Bridge transaction details screen ([#29075](https://github.com/MetaMask/metamask-extension/pull/29075))
42+
- Removed the Cancel button for Bridge transactions in the activity list ([#28902](https://github.com/MetaMask/metamask-extension/pull/28902))
43+
- Removed the product tour from the Permissions Page ([#28966](https://github.com/MetaMask/metamask-extension/pull/28966))
44+
- [FLASK] Added support to display selected currencies for non-EVM accounts like BTC ([#28963](https://github.com/MetaMask/metamask-extension/pull/28963))
45+
46+
### Fixed
47+
- Replaced hardcoded slippage with dynamic values and disabled transaction submission 30 seconds after final quote fetch ([#29028](https://github.com/MetaMask/metamask-extension/pull/29028))
48+
- Fixed fallback icon to correctly display the first letter of the network name for non-popular networks ([#29121](https://github.com/MetaMask/metamask-extension/pull/29121))
49+
- Fixed token network filter to display icons and tooltips for 9 popular networks only ([#29112](https://github.com/MetaMask/metamask-extension/pull/29112))
50+
- Fixed token detection to display results across multiple networks when 'popular networks' filter is selected ([#29108](https://github.com/MetaMask/metamask-extension/pull/29108))
51+
- Fixed token list to respect the 'hide zero balance' setting for both native and ERC20 tokens across network filters ([#29058](https://github.com/MetaMask/metamask-extension/pull/29058))
52+
- Fixed sticky behavior of the autodetection banner and updated 'ignore all' functionality ([#29061](https://github.com/MetaMask/metamask-extension/pull/29061))
53+
- Fixed app crash when re-adding a network and interacting with the import token banner ([#28870](https://github.com/MetaMask/metamask-extension/pull/28870))
54+
- Applied design fixes to re-designed confirmation pages for improved user experience ([#29137](https://github.com/MetaMask/metamask-extension/pull/29137))
55+
- Fixed duplicate labels in the signature decoding section for multiple asset state changes ([#29020](https://github.com/MetaMask/metamask-extension/pull/29020))
56+
- Updated "Amount" Row visibility in transaction details for better clarity in contract interactions ([#3783](https://github.com/MetaMask/MetaMask-planning/issues/3783))
57+
- Updated NFT approve confirmation title to 'Withdrawal request' for consistency ([#29017](https://github.com/MetaMask/metamask-extension/pull/29017))
58+
- Increased alert severity to 'Danger' for pending Smart Transaction requests and blocked confirm button until resolved ([#29140](https://github.com/MetaMask/metamask-extension/pull/29140))
59+
- Updated 'Signing in with' label to display exclusively for SIWE requests, improving clarity in signature requests ([#28984](https://github.com/MetaMask/metamask-extension/pull/28984))
60+
- Fixed decimal input issue on advanced gas modal for macOS and improved validation for custom nonce and gas limit inputs ([#28869](https://github.com/MetaMask/metamask-extension/pull/28869))
61+
- Hid the first-time interaction alert for transactions involving internal accounts ([#28990](https://github.com/MetaMask/metamask-extension/pull/28990))
62+
- Added an origin row and content divider to transfer confirmations, and fixed a margin issue in the simulation details UI ([#28936](https://github.com/MetaMask/metamask-extension/pull/28936))
63+
- Fixed signature decoding data display for ERC-1155 tokens ([#28921](https://github.com/MetaMask/metamask-extension/pull/28921))
64+
- Updated confirmations to display Identicons ([#28645](https://github.com/MetaMask/metamask-extension/pull/28645))
65+
- Disabled link out modal for preinstalled Snap links ([#29142](https://github.com/MetaMask/metamask-extension/pull/29142))
66+
- Fixed app crash issue occurring after submitting a bridge transaction ([#29203](https://github.com/MetaMask/metamask-extension/pull/29203))
67+
- Limited Bridge transaction amounts to 6 decimal places to prevent text cutoff in activity items ([#29153](https://github.com/MetaMask/metamask-extension/pull/29153))
68+
- Fixed incorrect token symbol, token amount, and currency display in cross-chain swaps activity items ([#28899](https://github.com/MetaMask/metamask-extension/pull/28899))
69+
- Fixed transaction order for cross-chain swaps ([#28939](https://github.com/MetaMask/metamask-extension/pull/28939))
70+
- Fixed issue where clearing Activity tab data wiped txHistory for both source and destination chains in Bridge transactions ([#29000](https://github.com/MetaMask/metamask-extension/pull/29000))
71+
- [FLASK] Fixed Solana native balance display in the account selector ([#29054](https://github.com/MetaMask/metamask-extension/pull/29054))
72+
73+
## [12.9.3]
74+
### Fixed
75+
- Fix some cases where users were incorrectly seeing 0 token balances ([#29361](https://github.com/MetaMask/metamask-extension/pull/29361))
76+
- Ensure users that opt out of smart transaction decoding don't send network requests to related APIs ([#29341](https://github.com/
77+
MetaMask/metamask-extension/pull/29341))
78+
979
## [12.9.2]
1080
### Changed
1181
- Display the "Amount" row within the advanced view of contract interaction confirmations, and whenever the amount being sent differs from the "You Send" row of the transaction simulation information by more than 5% ([#29131](https://github.com/MetaMask/metamask-extension/pull/29131))
@@ -5487,7 +5557,10 @@ Update styles and spacing on the critical error page ([#20350](https://github.c
54875557
- Added the ability to restore accounts from seed words.
54885558

54895559

5490-
[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v12.9.2...HEAD
5560+
[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v12.10.1...HEAD
5561+
[12.10.1]: https://github.com/MetaMask/metamask-extension/compare/v12.10.0...v12.10.1
5562+
[12.10.0]: https://github.com/MetaMask/metamask-extension/compare/v12.9.3...v12.10.0
5563+
[12.9.3]: https://github.com/MetaMask/metamask-extension/compare/v12.9.2...v12.9.3
54915564
[12.9.2]: https://github.com/MetaMask/metamask-extension/compare/v12.9.1...v12.9.2
54925565
[12.9.1]: https://github.com/MetaMask/metamask-extension/compare/v12.9.0...v12.9.1
54935566
[12.9.0]: https://github.com/MetaMask/metamask-extension/compare/v12.8.1...v12.9.0

app/images/lisk.svg

+5
Loading

0 commit comments

Comments
 (0)