Skip to content

Commit

Permalink
Merge branch 'develop' into hm/integrate-metamask-links
Browse files Browse the repository at this point in the history
  • Loading branch information
hmalik88 committed Sep 17, 2024
2 parents 1bbe162 + bc4c4b1 commit b988e32
Show file tree
Hide file tree
Showing 124 changed files with 4,157 additions and 2,712 deletions.
4 changes: 2 additions & 2 deletions .github/scripts/check-template-and-add-labels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ enum RegressionStage {
Production
}

const knownBots = ["metamaskbot", "dependabot", "github-actions", "sentry-io"];
const knownBots = ["metamaskbot", "dependabot", "github-actions", "sentry-io", "devin-ai-integration"];

main().catch((error: Error): void => {
console.error(error);
Expand Down Expand Up @@ -82,7 +82,7 @@ async function main(): Promise<void> {
}

// If author is not part of the MetaMask organisation
if (!(await userBelongsToMetaMaskOrg(octokit, labelable?.author))) {
if (!knownBots.includes(labelable?.author) && !(await userBelongsToMetaMaskOrg(octokit, labelable?.author))) {
// Add external contributor label to the issue
await addLabelToLabelable(octokit, labelable, externalContributorLabel);
}
Expand Down
2 changes: 2 additions & 0 deletions .metamaskrc.dist
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ INFURA_PROJECT_ID=00000000000
;PASSWORD=METAMASK PASSWORD
;SEGMENT_WRITE_KEY=
;BRIDGE_USE_DEV_APIS=
;ANALYTICS_DATA_DELETION_SOURCE_ID=
;ANALYTICS_DATA_DELETION_ENDPOINT=
;SWAPS_USE_DEV_APIS=
;PORTFOLIO_URL=
;TRANSACTION_SECURITY_PROVIDER=
Expand Down
4 changes: 4 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ module.exports = {
config.resolve.alias['../../../../../../store/actions'] = require.resolve(
'../ui/__mocks__/actions.js',
);
// Import within controller-utils crashes storybook.
config.resolve.alias['@ethereumjs/util'] = require.resolve(
'../ui/__mocks__/ethereumjs-util.js',
);
config.resolve.fallback = {
child_process: false,
constants: false,
Expand Down
16 changes: 16 additions & 0 deletions .yarn/patches/jest-environment-jsdom-npm-29.7.0-0b72dd0e0b.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/build/index.js b/build/index.js
index 2e6c16c33c2f588cf8d6a5717ac776bb8908bd0d..5534a739c6bc7cda9e0f8439656a6215dfacc26a 100644
--- a/build/index.js
+++ b/build/index.js
@@ -95,6 +95,11 @@ class JSDOMEnvironment {

// TODO: remove this ASAP, but it currently causes tests to run really slow
global.Buffer = Buffer;
+ // Needed to support toChecksumAddress from the ethereumjs-util@7.1.5.
+ // It converts a hex string to a buffer and then expects it to be an instanceof Uint8Array.
+ // And although on Node env that buffer is an instance of Uint8Array, on JSDOM it is not.
+ // So we need to override the jsdom Uint8Array with Node Uint8Array.
+ global.Uint8Array = Uint8Array;

// Report uncaught errors.
this.errorEventListener = event => {
6 changes: 2 additions & 4 deletions app/scripts/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ function maybeDetectPhishing(theController) {
return {};
}

const onboardState = theController.onboardingController.store.getState();
if (!onboardState.completedOnboarding) {
const { completedOnboarding } = theController.onboardingController.state;
if (!completedOnboarding) {
return {};
}

Expand Down Expand Up @@ -1005,8 +1005,6 @@ export function setupController(
updateBadge,
);

controller.txController.initApprovals();

/**
* Formats a count for display as a badge label.
*
Expand Down
5 changes: 5 additions & 0 deletions app/scripts/constants/sentry-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ export const SENTRY_BACKGROUND_STATE = {
traits: false,
dataCollectionForMarketing: false,
marketingCampaignCookieId: true,
latestNonAnonymousEventTimestamp: true,
},
MetaMetricsDataDeletionController: {
metaMetricsDataDeletionId: true,
metaMetricsDataDeletionTimestamp: true,
},
NameController: {
names: false,
Expand Down
3 changes: 2 additions & 1 deletion app/scripts/constants/stream.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
// contexts
export const CONTENT_SCRIPT = 'metamask-contentscript';
export const METAMASK_INPAGE = 'metamask-inpage';
export const PHISHING_WARNING_PAGE = 'metamask-phishing-warning-page';

// stream channels
export const METAMASK_PROVIDER = 'metamask-provider';
export const METAMASK_COOKIE_HANDLER = 'metamask-cookie-handler';
export const METAMASK_PROVIDER = 'metamask-provider';
export const PHISHING_SAFELIST = 'metamask-phishing-safelist';
export const PHISHING_STREAM = 'phishing';

Expand Down
Loading

0 comments on commit b988e32

Please sign in to comment.