Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Don't show third party notice for preinstalled Snaps #27351

Closed
wants to merge 112 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
2dc3768
fix: Fix SelectedNetworkController state corruption by making Network…
jiexi Aug 16, 2024
2d63c0e
chore(webpack): update `html-bundler-webpack-plugin` from `v3.6.5` to…
davidmurdoch Aug 16, 2024
211cf40
fix: Remove double padding on Snap home page (#26462)
FrederikBolding Aug 16, 2024
4ca39b4
fix: Permit ellipsis should use max 15 char (#26458)
digiwand Aug 16, 2024
4e35c94
feat: Add footers to Snap home pages (#26463)
FrederikBolding Aug 16, 2024
7916145
feat(notifications): use notification services push controller (#26448)
Prithpal-Sooriya Aug 16, 2024
7198656
fix: `rpcIdentifierUtility` client side grouping before emitting Cust…
gambinish Aug 16, 2024
0997f33
fix: Update send transactions with custom nonce.csv (#26451)
sleepytanya Aug 16, 2024
eff95c7
build(chore): switch to `defer` since it guarantees execution order o…
davidmurdoch Aug 16, 2024
555eb57
test: Add manual scenario for upgrade testing (#26317)
chloeYue Aug 16, 2024
f659700
chore: downgrade prettier-eslint to match prettier version (#26145)
legobeat Aug 16, 2024
0562f18
fix: Restore `responsive` e2e driver option (#25932)
pedronfigueiredo Aug 16, 2024
3c066c5
chore: Add Near Icon (#26459)
gambinish Aug 16, 2024
1b22343
chore: remove token and nft detection modals (#26403)
bergeron Aug 19, 2024
69696bb
perf: add parallel fetching for the network fee dropdown (#26489)
Prithpal-Sooriya Aug 19, 2024
e3aef95
feat(notifications): use shared libraries NotificationServicesControl…
Prithpal-Sooriya Aug 19, 2024
2c61cd4
Merge origin/develop into master-sync
hjetpoluru Aug 19, 2024
d553f88
Merge pull request #26497 from MetaMask/master-sync
Gudahtt Aug 19, 2024
59e1135
feat: Update @blockaid/ppom_release to release 1.5.2 (#26494)
jpuri Aug 19, 2024
6aba7d2
fix: Fix migration 120.3 error caused by invalid state (#26485)
Gudahtt Aug 19, 2024
d3541a3
chore: Integrate SnapInsightsController (#26411)
FrederikBolding Aug 19, 2024
e48324c
fix: permit simulation design (#26186)
OGPoyraz Aug 19, 2024
97246c5
test: add `driver.clickElementAndWaitForWindowToClose` helper method …
davidmurdoch Aug 19, 2024
81af2e8
docs: Include MV2 build commands in README (#26486)
Gudahtt Aug 19, 2024
dd4c2b4
feat(snaps): Removed Snaps name-lookup permission code fences (#26393)
ritave Aug 20, 2024
fc3da74
fix: Permit Simulation should include decimals in fiat calculation an…
digiwand Aug 20, 2024
8355bcf
fix: Snap Address component UI/UX (Snaps custom UI) (#26477)
david0xd Aug 20, 2024
9ee22f8
fix: missing deadline in swaps stx status screen (#25779)
infiniteflower Aug 20, 2024
111f170
fix: NetworkChangeToast width in wide screen mode (#26532)
jpuri Aug 20, 2024
da1ebc4
feat: migrate protect intrinsics test to e2e (#26197)
itsyoboieltr Aug 20, 2024
084768a
fix: correct duplicate notifications event tracking in global menu (#…
matteoscurati Aug 20, 2024
6ed72f0
fix: name being out of sync in account list (#26542)
montelaidev Aug 20, 2024
e95ba94
fix: stick add team label version to commit hash (#26540)
itsyoboieltr Aug 20, 2024
f6fc55e
feat: added AccountWatcher as preinstalled snap and added to menu lis…
k-g-j Aug 20, 2024
96b4475
fix: track `swapAndSend` transaction type (#26535)
BZahory Aug 20, 2024
5f524f1
fix: adding warning for origin on redesigned pages (#26306)
jpuri Aug 21, 2024
27655eb
fix(deps): Bump `@metamask/eth-json-rpc-middleware` to `^14.0.0`, `@m…
MajorLift Aug 21, 2024
6dc12d6
fix: Allowlist Snap UI card component (#26565)
FrederikBolding Aug 21, 2024
590f0a9
feat: Enable hardware wallets for smart transactions, sign a transact…
dan437 Aug 21, 2024
5781edb
fix: Fix MV2 build sourcemap upload (#26467)
Gudahtt Aug 21, 2024
72b9e86
feat: Redesign Approve confirmation (#26464)
pedronfigueiredo Aug 21, 2024
c9df9f1
chore: Rename `permittedChains` permission to `endowment:permitted-ch…
Mrtenz Aug 21, 2024
ab79f0d
fix: Snapshot unit tests (#26585)
pedronfigueiredo Aug 21, 2024
e174704
feat(sentry): Adding extensionId and installType to Sentry (#26482)
vthomas13 Aug 21, 2024
1a5003d
feat: Add approval static simulation (#26514)
pedronfigueiredo Aug 21, 2024
c85cf5b
feat: update add team label workflow (#26548)
itsyoboieltr Aug 21, 2024
187da88
feat: account watcher e2e (#26524)
k-g-j Aug 21, 2024
a4f5970
test: add tests for insufficient funds alert (#26512)
pnarayanaswamy Aug 22, 2024
862c9c3
feat: add transaction performance metrics (#26332)
matthewwalsh0 Aug 22, 2024
8f8a0ba
feat: Add contract deployment redesigned transaction screen (#26382)
pedronfigueiredo Aug 22, 2024
796d053
fix: flaky test `Test Snap Name Lookup tests name-lookup functionalit…
seaona Aug 22, 2024
b3865bc
fix: remove speed up and cancel controller validation (#26492)
matthewwalsh0 Aug 22, 2024
82eb13e
feat: new receive flow (#26148)
jonybur Aug 22, 2024
41736f0
test: [Snaps E2E] Update snaps dialog test to include Custom dialog t…
bowensanders Aug 22, 2024
ed44d49
refactor: Use generic helper function to initiate signatures (#26584)
pnarayanaswamy Aug 22, 2024
d2d48d2
refactor: Replace usages of the deprecated `setProviderType` (#22619)
Gudahtt Aug 22, 2024
d81d69b
feat: Integrate Snaps into the redesigned confirmations (#26435)
FrederikBolding Aug 22, 2024
759b92e
fix: bump accounts controller and migration to fix undefined selected…
montelaidev Aug 22, 2024
6088797
chore: add user IDs to send page analytics (#26600)
BZahory Aug 22, 2024
c965bcc
chore: anonymize send analytic properties #26627 (#26628)
BZahory Aug 22, 2024
857c5fa
chore: set bridge network allowlists from feature flags (#26147)
micaelae Aug 22, 2024
1065c49
docs: Add publish a release to Sentry flow steps (#26605)
seaona Aug 23, 2024
800a9d3
feat: upgrade network controller to v20 (#26150)
bergeron Aug 23, 2024
7b8831a
Merge origin/develop into master-sync
hjetpoluru Aug 23, 2024
0a96c7d
chore: Polish multichain token list styles (#26300)
gambinish Aug 23, 2024
23aabcd
chore: bump smart transactions controller (#26644)
bergeron Aug 26, 2024
ee52d48
fix: flaky test `Increase Token Allowance increases token spending ca…
hjetpoluru Aug 26, 2024
e1f9b96
Merge branch 'develop' into master-sync
chloeYue Aug 26, 2024
80b28d6
fix: flaky test `Vault Decryptor Page is able to decrypt the vault us…
seaona Aug 26, 2024
5aeac0f
fix: flaky tests `Sentry errors before initialization, after opting i…
seaona Aug 26, 2024
a21d0ce
fix: flaky test `Phishing Detection should navigate the user to Phish…
seaona Aug 26, 2024
4ca92eb
chore: update gitignore (#26642)
vinnyhoward Aug 26, 2024
28d784e
Merge pull request #26641 from MetaMask/master-sync
Gudahtt Aug 26, 2024
d9e989e
fix: catch error for getTokenStandardAndDetails (#26269)
sahar-fehri Aug 26, 2024
aea494d
fix(snaps): Use ApprovalType instead DIALOG_APPROVAL_TYPES in confirm…
ritave Aug 27, 2024
5b6e7ef
chore: MMI adds back the current Tx confirmation view to MMI (#26539)
zone-live Aug 27, 2024
4d82374
fix: update moonbeam and moonriver network and token logos (#26677)
sahar-fehri Aug 27, 2024
a1239e6
feat: updated ui for adding chain id screen (#25777)
NidhiKJha Aug 27, 2024
c2e9fc4
test: [Snaps E2E] Add test cases for signature confirmations redesign…
bowensanders Aug 28, 2024
999dd56
fix: Address design review on contract interaction and deployment red…
pedronfigueiredo Aug 28, 2024
84f4557
perf: add trace for UI startup (#26636)
matthewwalsh0 Aug 28, 2024
682cc8a
feat: Added Edit networks screen modal (#26097)
NidhiKJha Aug 28, 2024
37ed370
fix: adding missing token images (#26708)
sahar-fehri Aug 28, 2024
c3069ee
chore: update @metamask/bitcoin-wallet-snap to 0.5.0 (#26701)
ccharly Aug 28, 2024
99d2c86
feat: Add metrics to track where signature rejection occurred (#26469)
pnarayanaswamy Aug 28, 2024
82c3634
perf: use an interstitial page to load `popup.html`; load scripts usi…
davidmurdoch Aug 28, 2024
fb58241
feat: Temporarily hide Approve redesigned pages (#26676)
pedronfigueiredo Aug 28, 2024
6b4257b
test: Add integration tests for network busy alert (#26679)
pnarayanaswamy Aug 28, 2024
46bf4e8
fix: Add IOTX icon (#26723)
gambinish Aug 28, 2024
fb61b0f
fix: `wallet_addEthereumChain` does not attach a `result` under certa…
adonesky1 Aug 28, 2024
5174392
feat: adding context to get current confirmation in re-designed confi…
jpuri Aug 29, 2024
830e11a
fix: flaky test `Navigation Signature - Different signature types ini…
seaona Aug 29, 2024
024f94e
fix: flaky test `Click bridge button @no-mmi loads portfolio tab from…
seaona Aug 29, 2024
2f30256
test: Add integration test for gas estimate failed alert (#26681)
pnarayanaswamy Aug 29, 2024
1f8193b
test: [Snaps E2E] Add changes to fix flakiness in Snaps UI Images tes…
bowensanders Aug 29, 2024
f354888
test: Add integration test for insufficient gas (#26711)
pnarayanaswamy Aug 29, 2024
9813d25
Merge origin/develop into master-sync
benjisclowder Aug 29, 2024
690deb4
chore: MMI Fixes passing the state to route using history.push (#26722)
zone-live Aug 29, 2024
1342797
fix: Stop using a hardcoded Snap ID for notifications (#26739)
FrederikBolding Aug 29, 2024
3e5ac65
Merge pull request #26737 from MetaMask/master-sync
Gudahtt Aug 29, 2024
e8273d8
fix: Sentry app state null data to show null as value. (#26522)
NiranjanaBinoy Aug 29, 2024
11f4a57
chore: Bump `storybook`, `@storybook/*` to `^7.6.20`, `storybook-dark…
legobeat Aug 29, 2024
b9173da
fix: rename migration 126 to 121.1 (#26742)
montelaidev Aug 29, 2024
f086572
refactor: extract Send-specific functionality out of AssetPicker (#26…
micaelae Aug 29, 2024
e177ba0
chore: Bump Snaps dependencies (#26675)
FrederikBolding Aug 29, 2024
761562a
fix: Improve migration 121.1 state validation (#26773)
Gudahtt Aug 29, 2024
be04ca8
feat: implement client side malicious network request detection (#25839)
AugmentedMode Aug 29, 2024
1b4417d
feat: Update Polygon from `MATIC` to `POL` (#26671)
gambinish Aug 29, 2024
b7120e0
fix: flaky test `Test Snap Interactive UI test interactive ui element…
seaona Aug 30, 2024
cc8d487
Version v12.4.0
metamaskbot Aug 30, 2024
bdc819a
fix: move porfolio button next to price amount (#26867) (#26897)
jonybur Sep 4, 2024
9fbf6d9
fix: Don't show third party notice for preinstalled Snaps (#27319)
Mrtenz Sep 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1564,9 +1564,15 @@ jobs:
- run:
name: Publish main release to Sentry
command: yarn sentry:publish
- run:
name: Publish main MV2 release to Sentry
command: yarn sentry:publish --dist mv2
- run:
name: Publish Flask release to Sentry
command: yarn sentry:publish --build-type flask
- run:
name: Publish Flask MV2 release to Sentry
command: yarn sentry:publish --build-type flask --dist mv2
- run:
name: Publish MMI release to Sentry
command: yarn sentry:publish --build-type mmi
Expand Down
89 changes: 0 additions & 89 deletions .github/scripts/add-team-label.ts

This file was deleted.

4 changes: 3 additions & 1 deletion .github/workflows/add-team-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:

jobs:
add-team-label:
uses: metamask/github-tools/.github/workflows/add-team-label.yml@main
uses: metamask/github-tools/.github/workflows/add-team-label.yml@058012b49ff2fbd9649c566ba43b29497f93b21d
permissions:
pull-requests: write
secrets:
PERSONAL_ACCESS_TOKEN: ${{ secrets.RELEASE_LABEL_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,5 @@ licenseInfos.json
# API Spec tests
html-report/

/app/images/branding

36 changes: 11 additions & 25 deletions .storybook/test-data.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { draftTransactionInitialState } from '../ui/ducks/send';
import { KeyringType } from '../shared/constants/keyring';
import { NetworkType } from '@metamask/controller-utils';
import { NetworkStatus } from '@metamask/network-controller';
import { EthAccountType } from '@metamask/keyring-api';
import { CHAIN_IDS } 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';
import { ETH_EOA_METHODS } from '../shared/constants/eth-methods';
import { mockNetworkState } from '../test/stub/networks';

const state = {
invalidCustomNetwork: {
Expand Down Expand Up @@ -181,15 +181,6 @@ const state = {
1559: true,
},
},
selectedNetworkClientId: NetworkType.mainnet,
networksMetadata: {
[NetworkType.mainnet]: {
EIPS: {
1559: true,
},
status: NetworkStatus.Available,
},
},
gasFeeEstimates: '0x5208',
swapsState: {
quotes: {},
Expand Down Expand Up @@ -705,13 +696,6 @@ const state = {
connectedStatusPopoverHasBeenShown: true,
swapsWelcomeMessageHasBeenShown: true,
defaultHomeActiveTabName: 'Tokens',
providerConfig: {
type: 'sepolia',
ticker: 'ETH',
nickname: 'Sepolia',
rpcUrl: '',
chainId: '0xaa36a7',
},
network: '5',
accounts: {
'0x64a845a5b02460acf8a3d84503b0d68d028b4bb4': {
Expand Down Expand Up @@ -1234,21 +1218,23 @@ const state = {
accounts: ['0x9d0ba4ddac06032527b140912ec808ab9451b788'],
},
],
networkConfigurations: {
'test-networkConfigurationId-1': {
...mockNetworkState({
id: 'test-networkConfigurationId-1',
rpcUrl: 'https://testrpc.com',
chainId: '0x1',
nickname: 'mainnet',
rpcPrefs: { blockExplorerUrl: 'https://etherscan.io' },
},
'test-networkConfigurationId-2': {
blockExplorerUrl: 'https://etherscan.io',
metadata: {
EIPS: { 1559: true },
status: NetworkStatus.Available,
}
}, {
id: 'test-networkConfigurationId-2',
rpcUrl: 'http://localhost:8545',
chainId: '0x539',
ticker: 'ETH',
nickname: 'Localhost 8545',
rpcPrefs: {},
},
},
}),
accountTokens: {
'0x64a845a5b02460acf8a3d84503b0d68d028b4bb4': {
'0x1': [
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
diff --git a/PATCH.txt b/PATCH.txt
new file mode 100644
index 0000000000000000000000000000000000000000..78b9156dc2b0bf7c33dadf325cb3ec0bfae71ccb
--- /dev/null
+++ b/PATCH.txt
@@ -0,0 +1,3 @@
+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 {
*/
async initializeProvider() {
_chunkZ4BLTVTBjs.__privateMethod.call(void 0, 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 {
*/
async initializeProvider() {
__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
15 changes: 15 additions & 0 deletions .yarn/patches/@metamask-ppom-validator-npm-0.32.0-f677deea54.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/dist/ppom-controller.js b/dist/ppom-controller.js
index 9cf1502efabec00b25ad381bf2001200ccc9f34f..bfe55b6e68989f794deab069e8b80fc8d719ec25 100644
--- a/dist/ppom-controller.js
+++ b/dist/ppom-controller.js
@@ -203,7 +203,9 @@ async function _PPOMController_initialisePPOM() {
console.error(`Error in deleting files: ${error.message}`);
});
}, _PPOMController_onNetworkChange = function _PPOMController_onNetworkChange(networkControllerState) {
- const id = (0, util_1.addHexPrefix)(networkControllerState.providerConfig.chainId);
+ const selectedNetworkClient = this.messagingSystem.call('NetworkController:getNetworkClientById', networkControllerState.selectedNetworkClientId);
+ const { chainId } = selectedNetworkClient.configuration;
+ const id = (0, util_1.addHexPrefix)(chainId);
if (id === __classPrivateFieldGet(this, _PPOMController_chainId, "f")) {
return;
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/package.json b/package.json
index 9464ffc2614c6c648051df5cb5c9c9b9e651a831..5b1bcb34b8167cf6bbc5b2854b1f196e0fa0204f 100644
index e738c058c38f8bc5c14bab9644ecced32eefa075..9aba0d03fc642572fcbdc2c791e335df72d70f35 100644
--- a/package.json
+++ b/package.json
@@ -9,7 +9,7 @@
Expand Down
33 changes: 33 additions & 0 deletions .yarn/patches/@trezor-connect-web-npm-9.3.0-040ab10d9a.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
diff --git a/lib/impl/core-in-iframe.js b/lib/impl/core-in-iframe.js
index c47cf3bff860d6b1855341c00b80fc6c40f9d6d5..275eb0f312ff396819fa406c154a3562842db49d 100644
--- a/lib/impl/core-in-iframe.js
+++ b/lib/impl/core-in-iframe.js
@@ -116,7 +116,9 @@ class CoreInIframe {
this._log.enabled = !!this._settings.debug;
window.addEventListener('message', this.boundHandleMessage);
window.addEventListener('unload', this.boundDispose);
- await iframe.init(this._settings);
+ const modifiedSettings = Object.assign({}, this.settings);
+ modifiedSettings.env = 'webextension';
+ await iframe.init(modifiedSettings);
if (this._settings.sharedLogger !== false) {
iframe.initIframeLogger();
}
diff --git a/lib/popup/index.js b/lib/popup/index.js
index 9b13c370a5ac8b4e4fc0315ed40cdf615d0bb0cb..4dbd97fc28df49beb73379451974ec48a8a42ea7 100644
--- a/lib/popup/index.js
+++ b/lib/popup/index.js
@@ -229,10 +229,12 @@ class PopupManager extends events_1.default {
}
else if (message.type === events_2.POPUP.LOADED) {
this.handleMessage(message);
+ const modifiedSettings = Object.assign({}, this.settings);
+ modifiedSettings.env = 'webextension';
this.channel.postMessage({
type: events_2.POPUP.INIT,
payload: {
- settings: this.settings,
+ settings: modifiedSettings,
useCore: true,
},
});
Loading
Loading