Skip to content

Commit

Permalink
Merge branch 'editing-flow' into jl/editing-flow-refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
jiexi committed Sep 20, 2024
2 parents f0fef80 + 3329bcd commit 8dfb2e6
Show file tree
Hide file tree
Showing 308 changed files with 9,916 additions and 9,873 deletions.
28 changes: 23 additions & 5 deletions .storybook/test-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import { draftTransactionInitialState } from '../ui/ducks/send';
import { KeyringType } from '../shared/constants/keyring';
import { NetworkStatus } from '@metamask/network-controller';
import { EthAccountType } from '@metamask/keyring-api';
import { CHAIN_IDS } from '../shared/constants/network';
import {
CHAIN_IDS,
LINEA_MAINNET_DISPLAY_NAME,
} from '../shared/constants/network';
import { copyable, divider, heading, panel, text } from '@metamask/snaps-sdk';
import { getJsxElementFromComponent } from '@metamask/snaps-utils';
import { FirstTimeFlowType } from '../shared/constants/onboarding';
Expand Down Expand Up @@ -1218,23 +1221,37 @@ const state = {
accounts: ['0x9d0ba4ddac06032527b140912ec808ab9451b788'],
},
],
...mockNetworkState({
...mockNetworkState(
{
id: 'test-networkConfigurationId-1',
rpcUrl: 'https://testrpc.com',
chainId: '0x1',
nickname: 'mainnet',
name: 'mainnet',
blockExplorerUrl: 'https://etherscan.io',
metadata: {
EIPS: { 1559: true },
status: NetworkStatus.Available,
}
}, {
},
},
{
id: 'test-networkConfigurationId-2',
rpcUrl: 'https://testrpc2.com',
chainId: '0xe708',
nickname: LINEA_MAINNET_DISPLAY_NAME,
name: LINEA_MAINNET_DISPLAY_NAME,
blockExplorerUrl: 'https://lineascan.build',
metadata: { EIPS: { 1559: true }, status: NetworkStatus.Available },
},
{
id: 'test-networkConfigurationId-3',
rpcUrl: 'http://localhost:8545',
chainId: '0x539',
name: 'test network',
ticker: 'ETH',
nickname: 'Localhost 8545',
}),
},
),
accountTokens: {
'0x64a845a5b02460acf8a3d84503b0d68d028b4bb4': {
'0x1': [
Expand Down Expand Up @@ -1278,6 +1295,7 @@ const state = {
ipfsGateway: 'dweb.link',
migratedPrivacyMode: false,
selectedAddress: '0x9d0ba4ddac06032527b140912ec808ab9451b788',
selectedNetworkClientId: 'test-networkConfigurationId-1',
metaMetricsId:
'0xc2377d11fec1c3b7dd88c4854240ee5e3ed0d9f63b00456d98d80320337b827f',
currentCurrency: 'usd',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,26 @@ index 0000000000000000000000000000000000000000..78b9156dc2b0bf7c33dadf325cb3ec0b
+We remove `lookupNetwork` from `initializeProvider` in the network controller to prevent network requests before user onboarding is completed.
+The network lookup is done after onboarding is completed, and when the extension reloads if onboarding has been completed.
+This patch is part of a temporary fix that will be reverted soon to make way for a more permanent solution. https://github.com/MetaMask/metamask-extension/pull/23005
diff --git a/dist/chunk-BEL2VMHN.js b/dist/chunk-BEL2VMHN.js
index fcf6c5ad51d0db75cf0e3219a569e17437a55486..751447609c924e626c0f442931eb77687b160e42 100644
--- a/dist/chunk-BEL2VMHN.js
+++ b/dist/chunk-BEL2VMHN.js
@@ -315,7 +315,6 @@ var NetworkController = class extends _basecontroller.BaseController {
diff --git a/dist/chunk-BV3ZGWII.mjs b/dist/chunk-BV3ZGWII.mjs
index 0d1bf3b6348ad4ec7a799083fcadf36f9fc74851..48a09c6e474da9c18115bec88130a88888337044 100644
--- a/dist/chunk-BV3ZGWII.mjs
+++ b/dist/chunk-BV3ZGWII.mjs
@@ -468,7 +468,6 @@ var NetworkController = class extends BaseController {
*/
async initializeProvider() {
_chunkZ4BLTVTBjs.__privateMethod.call(void 0, this, _applyNetworkSelection, applyNetworkSelection_fn).call(this, this.state.selectedNetworkClientId);
__privateMethod(this, _applyNetworkSelection, applyNetworkSelection_fn).call(this, this.state.selectedNetworkClientId);
- await this.lookupNetwork();
}
/**
* Refreshes the network meta with EIP-1559 support and the network status
diff --git a/dist/chunk-RTMQACMX.mjs b/dist/chunk-RTMQACMX.mjs
index fc6ae58a396aaa062e8d9a8de2cddd5ef073a5a4..2a6f811c10a0ed3fc943f4672b21a5d1c195c7cd 100644
--- a/dist/chunk-RTMQACMX.mjs
+++ b/dist/chunk-RTMQACMX.mjs
@@ -315,7 +315,6 @@ var NetworkController = class extends BaseController {
diff --git a/dist/chunk-YOHMQPGM.js b/dist/chunk-YOHMQPGM.js
index ff15cd78ef90b35f86aae9dc64d17d1d2efe352d..14a8bba39c204585164dfb252d0a183844a58d63 100644
--- a/dist/chunk-YOHMQPGM.js
+++ b/dist/chunk-YOHMQPGM.js
@@ -468,7 +468,6 @@ var NetworkController = class extends _basecontroller.BaseController {
*/
async initializeProvider() {
__privateMethod(this, _applyNetworkSelection, applyNetworkSelection_fn).call(this, this.state.selectedNetworkClientId);
_chunkZ4BLTVTBjs.__privateMethod.call(void 0, this, _applyNetworkSelection, applyNetworkSelection_fn).call(this, this.state.selectedNetworkClientId);
- await this.lookupNetwork();
}
/**
Expand Down
6 changes: 0 additions & 6 deletions app/_locales/am/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions app/_locales/ar/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions app/_locales/bg/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions app/_locales/bn/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions app/_locales/ca/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions app/_locales/cs/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions app/_locales/da/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8dfb2e6

Please sign in to comment.