Skip to content

Commit

Permalink
Merge pull request #25296 from MetaMask/Version-v11.16.11
Browse files Browse the repository at this point in the history
Version-v11.16.11
  • Loading branch information
danjm authored Jun 14, 2024
2 parents f795589 + a115615 commit 74f05d7
Show file tree
Hide file tree
Showing 30 changed files with 3,873 additions and 351 deletions.
2,630 changes: 2,630 additions & 0 deletions .yarn/patches/@metamask-gas-fee-controller-npm-15.1.2-db4d2976aa.patch

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [11.16.11]
### Fixed
- Ensure network requests for phishing lists are not sent if the Basic Functionality Toggle is off ([#25306](https://github.com/MetaMask/metamask-extension/pull/25306))

## [11.16.10]
### Fixed
- Capture Segment errors during initialization ([#25253](https://github.com/MetaMask/metamask-extension/pull/25253))
Expand Down Expand Up @@ -4808,7 +4812,8 @@ Update styles and spacing on the critical error page ([#20350](https://github.c
- Added the ability to restore accounts from seed words.


[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v11.16.10...HEAD
[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v11.16.11...HEAD
[11.16.11]: https://github.com/MetaMask/metamask-extension/compare/v11.16.10...v11.16.11
[11.16.10]: https://github.com/MetaMask/metamask-extension/compare/v11.16.9...v11.16.10
[11.16.9]: https://github.com/MetaMask/metamask-extension/compare/v11.16.8...v11.16.9
[11.16.8]: https://github.com/MetaMask/metamask-extension/compare/v11.16.7...v11.16.8
Expand Down
7 changes: 7 additions & 0 deletions app/scripts/controllers/app-state.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export default class AppStateController extends EventEmitter {
showAccountBanner: true,
trezorModel: null,
currentPopupId: undefined,
onboardingDate: null,
newPrivacyPolicyToastClickedOrClosed: null,
newPrivacyPolicyToastShownDate: null,
// This key is only used for checking if the user had set advancedGasFee
Expand Down Expand Up @@ -186,6 +187,12 @@ export default class AppStateController extends EventEmitter {
});
}

setOnboardingDate() {
this.store.updateState({
onboardingDate: Date.now(),
});
}

setNewPrivacyPolicyToastClickedOrClosed() {
this.store.updateState({
newPrivacyPolicyToastClickedOrClosed: true,
Expand Down
1 change: 1 addition & 0 deletions app/scripts/lib/setupSentry.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export const SENTRY_BACKGROUND_STATE = {
browserEnvironment: true,
connectedStatusPopoverHasBeenShown: true,
currentPopupId: false,
onboardingDate: false,
currentExtensionPopupId: false,
defaultHomeActiveTabName: true,
fullScreenGasPollTokens: true,
Expand Down
23 changes: 19 additions & 4 deletions app/scripts/metamask-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,11 @@ import {
TokenStandard,
SIGNING_METHODS,
} from '../../shared/constants/transaction';
import { SWAPS_CLIENT_ID } from '../../shared/constants/swaps';
import {
GAS_API_BASE_URL,
GAS_DEV_API_BASE_URL,
SWAPS_CLIENT_ID,
} from '../../shared/constants/swaps';
import {
CHAIN_IDS,
NETWORK_TYPES,
Expand Down Expand Up @@ -747,6 +751,10 @@ export default class MetamaskController extends EventEmitter {
allowedEvents: ['NetworkController:stateChange'],
});

const gasApiBaseUrl = process.env.SWAPS_USE_DEV_APIS
? GAS_DEV_API_BASE_URL
: GAS_API_BASE_URL;

this.gasFeeController = new GasFeeController({
state: initState.GasFeeController,
interval: 10000,
Expand All @@ -766,12 +774,13 @@ export default class MetamaskController extends EventEmitter {
),
getCurrentAccountEIP1559Compatibility:
this.getCurrentAccountEIP1559Compatibility.bind(this),
legacyAPIEndpoint: `${gasApiBaseUrl}/networks/<chain_id>/gasPrices`,
EIP1559APIEndpoint: `${gasApiBaseUrl}/networks/<chain_id>/suggestedGasFees`,
getCurrentNetworkLegacyGasAPICompatibility: () => {
const { chainId } = this.networkController.state.providerConfig;
return chainId === CHAIN_IDS.BSC;
},
getChainId: () => this.networkController.state.providerConfig.chainId,
infuraAPIKey: opts.infuraProjectId,
});

this.appStateController = new AppStateController({
Expand Down Expand Up @@ -825,8 +834,6 @@ export default class MetamaskController extends EventEmitter {
stalelistRefreshInterval: process.env.IN_TEST ? 30 * SECOND : undefined,
});

this.phishingController.maybeUpdateState();

///: BEGIN:ONLY_INCLUDE_IF(blockaid)
this.ppomController = new PPOMController({
messenger: this.controllerMessenger.getRestricted({
Expand Down Expand Up @@ -2261,7 +2268,13 @@ export default class MetamaskController extends EventEmitter {
}

postOnboardingInitialization() {
const { usePhishDetect } = this.preferencesController.store.getState();

this.networkController.lookupNetwork();

if (usePhishDetect) {
this.phishingController.maybeUpdateState();
}
}

triggerNetworkrequests() {
Expand Down Expand Up @@ -3184,6 +3197,8 @@ export default class MetamaskController extends EventEmitter {
appStateController.setSurveyLinkLastClickedOrClosed.bind(
appStateController,
),
setOnboardingDate:
appStateController.setOnboardingDate.bind(appStateController),
setNewPrivacyPolicyToastClickedOrClosed:
appStateController.setNewPrivacyPolicyToastClickedOrClosed.bind(
appStateController,
Expand Down
Loading

0 comments on commit 74f05d7

Please sign in to comment.