From 838c8e1aa7d66ada6ed5e86e6d25e3d19fbd01f9 Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Mon, 21 Aug 2023 07:45:25 -0230 Subject: [PATCH 1/4] Use primary transaction to get token value in useTransactionDisplayData (#20536) Co-authored-by: Jyoti Puri --- ui/hooks/useTransactionDisplayData.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/hooks/useTransactionDisplayData.js b/ui/hooks/useTransactionDisplayData.js index 8d5f7bc3d..6ce9b11c5 100644 --- a/ui/hooks/useTransactionDisplayData.js +++ b/ui/hooks/useTransactionDisplayData.js @@ -198,7 +198,7 @@ export function useTransactionDisplayData(transactionGroup) { ); const tokenDisplayValue = useTokenDisplayValue( - initialTransaction?.txParams?.data, + primaryTransaction?.txParams?.data, token, isTokenCategory, ); From 88f294664f837442ac7b0bbd5db1cb4563714583 Mon Sep 17 00:00:00 2001 From: Danyal Prout Date: Mon, 14 Aug 2023 08:22:02 -0700 Subject: [PATCH 2/4] Specify that Base is a multilayer network (#20097) --- shared/constants/network.ts | 4 ++++ ui/selectors/selectors.js | 15 +++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/shared/constants/network.ts b/shared/constants/network.ts index c3eb9dc1d..a36d1961a 100644 --- a/shared/constants/network.ts +++ b/shared/constants/network.ts @@ -138,6 +138,8 @@ export const CHAIN_IDS = { BSC_TESTNET: '0x61', OPTIMISM: '0xa', OPTIMISM_TESTNET: '0x1a4', + BASE: '0x2105', + BASE_TESTNET: '0x14a33', POLYGON: '0x89', POLYGON_TESTNET: '0x13881', AVALANCHE: '0xa86a', @@ -542,6 +544,8 @@ export const BUYABLE_CHAINS_MAP: { ChainId, | typeof CHAIN_IDS.LOCALHOST | typeof CHAIN_IDS.OPTIMISM_TESTNET + | typeof CHAIN_IDS.BASE_TESTNET + | typeof CHAIN_IDS.BASE | typeof CHAIN_IDS.BSC_TESTNET | typeof CHAIN_IDS.POLYGON_TESTNET | typeof CHAIN_IDS.AVALANCHE_TESTNET diff --git a/ui/selectors/selectors.js b/ui/selectors/selectors.js index 079c1f493..9cc5b74f3 100644 --- a/ui/selectors/selectors.js +++ b/ui/selectors/selectors.js @@ -1291,11 +1291,22 @@ export function getIsOptimism(state) { ); } +export function getIsBase(state) { + return ( + getCurrentChainId(state) === CHAIN_IDS.BASE || + getCurrentChainId(state) === CHAIN_IDS.BASE_TESTNET + ); +} + +export function getIsOpStack(state) { + return getIsOptimism(state) || getIsBase(state); +} + export function getIsMultiLayerFeeNetwork(state) { - return getIsOptimism(state); + return getIsOpStack(state); } /** - * To retrieve the maxBaseFee and priotitFee teh user has set as default + * To retrieve the maxBaseFee and priorityFee the user has set as default * * @param {*} state * @returns Boolean From 7f3ea4b9068d9afd6376aa2b436515ecf39750d3 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Mon, 21 Aug 2023 12:27:52 -0230 Subject: [PATCH 3/4] Update changelog to include last two commits --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ce2c6bf2..5c580bd4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [10.35.0] ### Added - Add the ability to customize tx nonce on ERC20 approval screens ([#17945](https://github.com/MetaMask/metamask-extension/pull/17945)) +- Improved gas estimates on Base network ([#20097](https://github.com/MetaMask/metamask-extension/pull/20097)) ### Changed - Update the "Spending Cap Request" screen (also known as the "ERC 20 approval" or "token allowance" screen) ([#19666](https://github.com/MetaMask/metamask-extension/pull/19666)) @@ -50,6 +51,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix to ensure "Account Details" is displayed when that option is selected from each accounts three-dot menu within the Account Menu ([#19857](https://github.com/MetaMask/metamask-extension/pull/19857)) - Render correct image in the asset dropdown while sending an NFT ([#19787](https://github.com/MetaMask/metamask-extension/pull/19787)) - Removed grey line from connected sites modal if there are no connected sites ([#20036](https://github.com/MetaMask/metamask-extension/pull/20036)) +- Fix custom nonce support on Approval confirmations ([#20536](https://github.com/MetaMask/metamask-extension/pull/20536)) - [FLASK] Fix overflow on snaps connect screen ([#19995](https://github.com/MetaMask/metamask-extension/pull/19995)) - [FLASK] Fix Snaps UI divider ([#19919](https://github.com/MetaMask/metamask-extension/pull/19919)) - [FLASK] Fix fetch for snap registry ([#19866](https://github.com/MetaMask/metamask-extension/pull/19866)) From ace2138a9457266462bf710b6a8e0a1620978db7 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Mon, 21 Aug 2023 18:39:15 -0230 Subject: [PATCH 4/4] Remove unnecessary change entry The bug fix in #20536 wasn't necessary to include because the bug it fixes was never in production. it was introduced in this release as part of #17945. --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c580bd4d..6bb54e3bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,7 +51,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix to ensure "Account Details" is displayed when that option is selected from each accounts three-dot menu within the Account Menu ([#19857](https://github.com/MetaMask/metamask-extension/pull/19857)) - Render correct image in the asset dropdown while sending an NFT ([#19787](https://github.com/MetaMask/metamask-extension/pull/19787)) - Removed grey line from connected sites modal if there are no connected sites ([#20036](https://github.com/MetaMask/metamask-extension/pull/20036)) -- Fix custom nonce support on Approval confirmations ([#20536](https://github.com/MetaMask/metamask-extension/pull/20536)) - [FLASK] Fix overflow on snaps connect screen ([#19995](https://github.com/MetaMask/metamask-extension/pull/19995)) - [FLASK] Fix Snaps UI divider ([#19919](https://github.com/MetaMask/metamask-extension/pull/19919)) - [FLASK] Fix fetch for snap registry ([#19866](https://github.com/MetaMask/metamask-extension/pull/19866))