From bc0d32de56995945ebae873b038cbc733ff0ad96 Mon Sep 17 00:00:00 2001 From: seaona Date: Tue, 6 Sep 2022 16:56:52 +0200 Subject: [PATCH 01/34] New 10.19.0 RC --- CHANGELOG.md | 228 +++++++++++++++++++++++++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 229 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 78c96256a..ff6006dba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,233 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [10.19.0] +### Uncategorized +- Replaced use of pubnub for uuid method in app/ directory ([#15712](https://github.com/MetaMask/metamask-extension/pull/15712)) +- Updated Avalanche rpcUrl endpoint ([#15720](https://github.com/MetaMask/metamask-extension/pull/15720)) +- Updated the main copy on SetApprovalForAll confirmation screen ([#15724](https://github.com/MetaMask/metamask-extension/pull/15724)) +- Set view full transaction details by default ([#15726](https://github.com/MetaMask/metamask-extension/pull/15726)) +- Make updateTransactionSendFlowHistory background method idempotent ([#15585](https://github.com/MetaMask/metamask-extension/pull/15585)) +- Make addUnapprovedTransaction action idempotent ([#15667](https://github.com/MetaMask/metamask-extension/pull/15667)) +- improvement it translation ([#15477](https://github.com/MetaMask/metamask-extension/pull/15477)) +- MV3: add retry logic to actions ([#15337](https://github.com/MetaMask/metamask-extension/pull/15337)) +- Unit tests for first time flow/new account and onboarding flow. ([#15625](https://github.com/MetaMask/metamask-extension/pull/15625)) +- Set lavamoat codeowners to allow supply chain reviews ([#15624](https://github.com/MetaMask/metamask-extension/pull/15624)) +- [FLASK] `snaps-skunkworks@0.20.0` ([#15706](https://github.com/MetaMask/metamask-extension/pull/15706)) +- Sentry e2e test ([#15715](https://github.com/MetaMask/metamask-extension/pull/15715)) +- Created a new token component ([#15617](https://github.com/MetaMask/metamask-extension/pull/15617)) +- [GridPlus] Version bump ([#15711](https://github.com/MetaMask/metamask-extension/pull/15711)) +- Sync v10.18.4 with `develop` ([#15710](https://github.com/MetaMask/metamask-extension/pull/15710)) +- add e2e test for default icons ([#13869](https://github.com/MetaMask/metamask-extension/pull/13869)) +- Merge remote-tracking branch 'origin/develop' into master-sync +- Update `object.values` patch ([#15692](https://github.com/MetaMask/metamask-extension/pull/15692)) +- chore: Adjust trailing whitespace ([#15636](https://github.com/MetaMask/metamask-extension/pull/15636)) +- updated casing in import Token for spanish ([#15687](https://github.com/MetaMask/metamask-extension/pull/15687)) +- development scripts: add node shebang; mark as executable ([#15655](https://github.com/MetaMask/metamask-extension/pull/15655)) +- Created a new contract details modal ([#15549](https://github.com/MetaMask/metamask-extension/pull/15549)) +- Token allowance improvements feature flag ([#15646](https://github.com/MetaMask/metamask-extension/pull/15646)) +- Updated origin pill component to match the new design ([#15603](https://github.com/MetaMask/metamask-extension/pull/15603)) +- Update `depcheck` to latest version ([#15690](https://github.com/MetaMask/metamask-extension/pull/15690)) +- Replace `lavamoat-runtime.js` patch ([#15682](https://github.com/MetaMask/metamask-extension/pull/15682)) +- upgrade jest ([#15642](https://github.com/MetaMask/metamask-extension/pull/15642)) +- Fix Sentry deduplication of events that were never sent ([#15677](https://github.com/MetaMask/metamask-extension/pull/15677)) +- Jest configuration fix ([#15673](https://github.com/MetaMask/metamask-extension/pull/15673)) +- Header component for transaction confirmation screens ([#15614](https://github.com/MetaMask/metamask-extension/pull/15614)) +- New network info popup ([#13319](https://github.com/MetaMask/metamask-extension/pull/13319)) +- Consolidating Zendesk URLs in to constants file ([#15669](https://github.com/MetaMask/metamask-extension/pull/15669)) +- Created review spending cap component ([#15633](https://github.com/MetaMask/metamask-extension/pull/15633)) +- Fix Sentry in LavaMoat contexts ([#15672](https://github.com/MetaMask/metamask-extension/pull/15672)) +- Fix LavaMoat policy generation script ([#15668](https://github.com/MetaMask/metamask-extension/pull/15668)) +- Using formatIconUrlWithProxy to get the iconUrl proxy of swap token ([#15562](https://github.com/MetaMask/metamask-extension/pull/15562)) +- Migrate app constants to typescript ([#15611](https://github.com/MetaMask/metamask-extension/pull/15611)) +- Updating Customize Nonce 'Learn More' link ([#15658](https://github.com/MetaMask/metamask-extension/pull/15658)) +- Ensuring Blockies icon is used in recipient details when enabled ([#15662](https://github.com/MetaMask/metamask-extension/pull/15662)) +- Fixing Contacts breadcrumb when viewing contact details ([#15663](https://github.com/MetaMask/metamask-extension/pull/15663)) +- Fixing Blockies identicon option alignment ([#15652](https://github.com/MetaMask/metamask-extension/pull/15652)) +- Remove unnecessary event props, update STX controller version ([#15653](https://github.com/MetaMask/metamask-extension/pull/15653)) +- Fixing token detection grammar ([#15644](https://github.com/MetaMask/metamask-extension/pull/15644)) +- Add validation to production build script ([#15468](https://github.com/MetaMask/metamask-extension/pull/15468)) +- Fix stray space/period in Custom Token warning text ([#15650](https://github.com/MetaMask/metamask-extension/pull/15650)) +- chore: Complete node16 upgrade ([#15634](https://github.com/MetaMask/metamask-extension/pull/15634)) +- Adding unit test case to for idempotent behaviour of importAccountWithStrategy idempotent ([#15583](https://github.com/MetaMask/metamask-extension/pull/15583)) +- Add unit test coverage to ensure that addToken method is idempotent. ([#15587](https://github.com/MetaMask/metamask-extension/pull/15587)) +- Convert LavaMoat policy generation script to Yargs application ([#15626](https://github.com/MetaMask/metamask-extension/pull/15626)) +- Bump @metamask/providers from 9.0.0 to 9.1.0 ([#15514](https://github.com/MetaMask/metamask-extension/pull/15514)) +- Fix onboarding events ([#15608](https://github.com/MetaMask/metamask-extension/pull/15608)) +- Add test case to ensure that action addCustomNetwork is idempotent ([#15602](https://github.com/MetaMask/metamask-extension/pull/15602)) +- added avatar network component ([#15502](https://github.com/MetaMask/metamask-extension/pull/15502)) +- filter breadcrumbs for improved clarity while debugging sentry errors ([#15639](https://github.com/MetaMask/metamask-extension/pull/15639)) +- Fix state creation in setupSentryGetStateGlobal ([#15635](https://github.com/MetaMask/metamask-extension/pull/15635)) +- UI-14395: typography v2 ([#15408](https://github.com/MetaMask/metamask-extension/pull/15408)) +- added avatar token component ([#15466](https://github.com/MetaMask/metamask-extension/pull/15466)) +- Fix Signature Request styles ([#15621](https://github.com/MetaMask/metamask-extension/pull/15621)) +- [FLASK] `snaps-skunkworks@0.19.0` ([#15619](https://github.com/MetaMask/metamask-extension/pull/15619)) +- Adding `BaseIcon` UI component ([#15609](https://github.com/MetaMask/metamask-extension/pull/15609)) +- New metrics data for token approval transactions ([#15289](https://github.com/MetaMask/metamask-extension/pull/15289)) +- Send to Contract ganache refactor ([#15605](https://github.com/MetaMask/metamask-extension/pull/15605)) +- Fix for randomly resets of updated values in network edit form ([#14370](https://github.com/MetaMask/metamask-extension/pull/14370)) +- the token detction change affected swap performace, this is fixing it ([#15607](https://github.com/MetaMask/metamask-extension/pull/15607)) +- Redirect a user to the Activity tab after they click on "View in Activity" ([#15620](https://github.com/MetaMask/metamask-extension/pull/15620)) +- Refactor failing contract with ganache seeder ([#15601](https://github.com/MetaMask/metamask-extension/pull/15601)) +- Updating Box to remove color prop default (Fixes develop) ([#15613](https://github.com/MetaMask/metamask-extension/pull/15613)) +- Update readme with some more docs and visuals of codebase ([#15577](https://github.com/MetaMask/metamask-extension/pull/15577)) +- Rename some events ([#15543](https://github.com/MetaMask/metamask-extension/pull/15543)) +- [e2e] Refactor contract-interactions spec using Ganache seeder ([#15553](https://github.com/MetaMask/metamask-extension/pull/15553)) +- Unit tests improvements ([#15517](https://github.com/MetaMask/metamask-extension/pull/15517)) +- Refactoring isManifestV3 variable ([#15568](https://github.com/MetaMask/metamask-extension/pull/15568)) +- Add initial Typescript Files ([#15596](https://github.com/MetaMask/metamask-extension/pull/15596)) +- Cleanup after TOKEN_DETECTION_V2 flag removal ([#15564](https://github.com/MetaMask/metamask-extension/pull/15564)) +- Fix rpc and tests ([#15570](https://github.com/MetaMask/metamask-extension/pull/15570)) +- Make add new account idempotent operation ([#15566](https://github.com/MetaMask/metamask-extension/pull/15566)) +- Call metrics event for wallet type selection at the right time ([#15591](https://github.com/MetaMask/metamask-extension/pull/15591)) +- Prevent type error in catch block in account-tracker.js _updateAccount ([#15589](https://github.com/MetaMask/metamask-extension/pull/15589)) +- RFC: sort keys rule and initial changes ([#15534](https://github.com/MetaMask/metamask-extension/pull/15534)) +- Fix #14846 - Inject provider for MV3 via app-init ([#15448](https://github.com/MetaMask/metamask-extension/pull/15448)) +- [GridPlus] Bumps `gridplus-sdk` to v2.2.4 ([#15561](https://github.com/MetaMask/metamask-extension/pull/15561)) +- Updating useMemo dependency list ([#15572](https://github.com/MetaMask/metamask-extension/pull/15572)) +- Adding initial and transparent to Box component ([#15565](https://github.com/MetaMask/metamask-extension/pull/15565)) +- Capture user actions times for MV2 benchmark and generate artifacts ([#15353](https://github.com/MetaMask/metamask-extension/pull/15353)) +- added color prop to Box component ([#15507](https://github.com/MetaMask/metamask-extension/pull/15507)) +- Add more tracking for MetaMask ([#15462](https://github.com/MetaMask/metamask-extension/pull/15462)) +- [e2e] Enabling/Disabling token conversion on testnets ([#14649](https://github.com/MetaMask/metamask-extension/pull/14649)) +- Adding polymorphic 'as' prop to Box component and updating Typography component to use the same ([#15518](https://github.com/MetaMask/metamask-extension/pull/15518)) +- Using Object.values for shuffle token list for swaps ([#15530](https://github.com/MetaMask/metamask-extension/pull/15530)) +- Fix deployment of TS migration dashboard (again) ([#15528](https://github.com/MetaMask/metamask-extension/pull/15528)) +- Fix text alignment in Add a Network popup view ([#15520](https://github.com/MetaMask/metamask-extension/pull/15520)) +- Fix deploying the TS migration dashboard ([#15516](https://github.com/MetaMask/metamask-extension/pull/15516)) +- Convert knobs and actions to controls/args ConfirmEncryptionPublicKey story ([#14319](https://github.com/MetaMask/metamask-extension/pull/14319)) +- ConfirmPage: update UI for setApproveForAll transactions to better warn users of the allowances ([#15512](https://github.com/MetaMask/metamask-extension/pull/15512)) +- Token detection V2 Flag Removal and Re-introducing the use of legacy token list when token detection is OFF ([#15138](https://github.com/MetaMask/metamask-extension/pull/15138)) +- docs: addition of controls and readme in SelectQuotePopover story ([#15187](https://github.com/MetaMask/metamask-extension/pull/15187)) +- Add TypeScript migration dashboard ([#13820](https://github.com/MetaMask/metamask-extension/pull/13820)) +- Fixing design system icon alternative color const ([#15513](https://github.com/MetaMask/metamask-extension/pull/15513)) +- deps - patch ethereumjs-util/dist/secp256k1 for fast module init via lazy loading ([#14682](https://github.com/MetaMask/metamask-extension/pull/14682)) +- 3box Replacement ([#15243](https://github.com/MetaMask/metamask-extension/pull/15243)) +- Only check if a user has enough token balance before calling STX ([#15218](https://github.com/MetaMask/metamask-extension/pull/15218)) +- Fix connected site styling ([#15409](https://github.com/MetaMask/metamask-extension/pull/15409)) +- Adding option to update lavamoat policies in parallel ([#14536](https://github.com/MetaMask/metamask-extension/pull/14536)) +- Various test files converting to @testing-library/react. ([#15504](https://github.com/MetaMask/metamask-extension/pull/15504)) +- [E2E]: Set approval for all e2e ([#15481](https://github.com/MetaMask/metamask-extension/pull/15481)) +- Update createMethodMiddleware.js ([#15505](https://github.com/MetaMask/metamask-extension/pull/15505)) +- Various test files converting to @testing-library/react. ([#15470](https://github.com/MetaMask/metamask-extension/pull/15470)) +- Updating content to sentence case and updating tests ([#15285](https://github.com/MetaMask/metamask-extension/pull/15285)) +- Fix build script errors ([#15493](https://github.com/MetaMask/metamask-extension/pull/15493)) +- Add comments about legacy streams ([#15492](https://github.com/MetaMask/metamask-extension/pull/15492)) +- Replace `rc` with `ini` ([#15464](https://github.com/MetaMask/metamask-extension/pull/15464)) +- Update Babel and dependencies ([#15392](https://github.com/MetaMask/metamask-extension/pull/15392)) +- Sync `master` with `develop` ([#15476](https://github.com/MetaMask/metamask-extension/pull/15476)) +- Fixing changelog +- Fix +- Merge remote-tracking branch 'origin/develop' into master-sync +- Refactor build script to include build target ([#15447](https://github.com/MetaMask/metamask-extension/pull/15447)) +- Updating Zendesk ticket request URLs ([#15458](https://github.com/MetaMask/metamask-extension/pull/15458)) +- Update media query instances ([#15068](https://github.com/MetaMask/metamask-extension/pull/15068)) +- Convert unit test render from enzyme to @testing-library/react. ([#15091](https://github.com/MetaMask/metamask-extension/pull/15091)) +- add safegaurd for missing account in action ([#15450](https://github.com/MetaMask/metamask-extension/pull/15450)) +- [FLASK] Add update snap UI ([#15143](https://github.com/MetaMask/metamask-extension/pull/15143)) +- Fix "app-init" injection ([#15320](https://github.com/MetaMask/metamask-extension/pull/15320)) +- Add Sign-In with Ethereum ([#14438](https://github.com/MetaMask/metamask-extension/pull/14438)) +- Moving incorrectly ordered page component to correct pages category ([#15426](https://github.com/MetaMask/metamask-extension/pull/15426)) +- remove unnecessary usage of renderableGasButton logic ([#15422](https://github.com/MetaMask/metamask-extension/pull/15422)) +- Add QA migration guide ([#14544](https://github.com/MetaMask/metamask-extension/pull/14544)) +- Add data about dropped transaction in FINALIZED metrics event ([#15383](https://github.com/MetaMask/metamask-extension/pull/15383)) +- [FLASK] Fix key management permission copy ([#14849](https://github.com/MetaMask/metamask-extension/pull/14849)) +- MV3: Re-activate service worker and reconnect UI streams ([#14781](https://github.com/MetaMask/metamask-extension/pull/14781)) +- Adding shadow docs to storybook ([#15388](https://github.com/MetaMask/metamask-extension/pull/15388)) +- added AvatarBase Component ([#15307](https://github.com/MetaMask/metamask-extension/pull/15307)) +- update prettier ([#15360](https://github.com/MetaMask/metamask-extension/pull/15360)) +- Bundle optimazation 0 ([#14782](https://github.com/MetaMask/metamask-extension/pull/14782)) +- Adding readme for component-library folder ([#15381](https://github.com/MetaMask/metamask-extension/pull/15381)) +- fix: patch borc to avoid v8 bailing out of caching bytecode for the entire bundle chunk ([#15385](https://github.com/MetaMask/metamask-extension/pull/15385)) +- fix storybook ([#15387](https://github.com/MetaMask/metamask-extension/pull/15387)) +- cast chainId to hex for metrics ([#15332](https://github.com/MetaMask/metamask-extension/pull/15332)) +- New Crowdin translations by Github Action ([#14975](https://github.com/MetaMask/metamask-extension/pull/14975)) +- Performance improvements for Swaps ([#15359](https://github.com/MetaMask/metamask-extension/pull/15359)) +- Added speed up metrics data for transaction events and properly track speed up type ([#15197](https://github.com/MetaMask/metamask-extension/pull/15197)) +- Clean up of code introduced with 43f7a44 ([#15158](https://github.com/MetaMask/metamask-extension/pull/15158)) +- Adjusting the height of account menu nav items to expand scroll area ([#15302](https://github.com/MetaMask/metamask-extension/pull/15302)) +- Remove unnecessary file extensions ([#15352](https://github.com/MetaMask/metamask-extension/pull/15352)) +- [FLASK] disable "Mark all as read button" when there are no notifications ([#15333](https://github.com/MetaMask/metamask-extension/pull/15333)) +- Updates to stories and component ([#15357](https://github.com/MetaMask/metamask-extension/pull/15357)) +- Add comments to build script ([#15319](https://github.com/MetaMask/metamask-extension/pull/15319)) +- added tx details popup to cancelled Swap ([#15273](https://github.com/MetaMask/metamask-extension/pull/15273)) +- [FLASK] Fix missing snap hook ([#15354](https://github.com/MetaMask/metamask-extension/pull/15354)) +- remove exclusions for mismatched object jsdoc type casing ([#15351](https://github.com/MetaMask/metamask-extension/pull/15351)) +- Sync `master` with `develop` ([#15355](https://github.com/MetaMask/metamask-extension/pull/15355)) +- Fix for script to measure bundle size over time ([#15338](https://github.com/MetaMask/metamask-extension/pull/15338)) +- remove audit exclusion ([#15346](https://github.com/MetaMask/metamask-extension/pull/15346)) +- Updated all instances of "Component API" to "Props" in storybook documentation ([#15324](https://github.com/MetaMask/metamask-extension/pull/15324)) +- Update Eslint and deps ([#15293](https://github.com/MetaMask/metamask-extension/pull/15293)) +- fix filetype audit ([#15334](https://github.com/MetaMask/metamask-extension/pull/15334)) +- reducing logic gates in tx metrics ([#15329](https://github.com/MetaMask/metamask-extension/pull/15329)) +- [FLASK] Fix snaps authorship pill ([#15190](https://github.com/MetaMask/metamask-extension/pull/15190)) +- Fix build ([#15328](https://github.com/MetaMask/metamask-extension/pull/15328)) +- Master sync following v10.18.0 ([#15326](https://github.com/MetaMask/metamask-extension/pull/15326)) +- added storybook controls for confirm send ether component ([#15235](https://github.com/MetaMask/metamask-extension/pull/15235)) +- Modify transaction type and add contract method data to metrics ([#15175](https://github.com/MetaMask/metamask-extension/pull/15175)) +- Merge remote-tracking branch 'origin/develop' into master-sync +- Fix environment variable injection ([#15318](https://github.com/MetaMask/metamask-extension/pull/15318)) +- [FLASK] Add snap update metrics ([#15206](https://github.com/MetaMask/metamask-extension/pull/15206)) +- Fix for mv3 performance stats ([#15321](https://github.com/MetaMask/metamask-extension/pull/15321)) +- Converted BuildQuote story to use controls and action argType ([#15234](https://github.com/MetaMask/metamask-extension/pull/15234)) +- Rename various build script functions ([#15317](https://github.com/MetaMask/metamask-extension/pull/15317)) +- Remove unused bundling options in build script ([#15316](https://github.com/MetaMask/metamask-extension/pull/15316)) +- Updating design tokens package and shadow values with new tokens ([#15264](https://github.com/MetaMask/metamask-extension/pull/15264)) +- Bundlesize stats over time ([#15209](https://github.com/MetaMask/metamask-extension/pull/15209)) +- added storybook controls for confirm deploy contract component ([#15236](https://github.com/MetaMask/metamask-extension/pull/15236)) +- Fix: Actionable Message on Confirm Transaction view is over Tabs ([#15272](https://github.com/MetaMask/metamask-extension/pull/15272)) +- fix blockExplorer link on setApprovalForAll confirmation screen ([#15312](https://github.com/MetaMask/metamask-extension/pull/15312)) +- MV3 bundle size stats ([#15191](https://github.com/MetaMask/metamask-extension/pull/15191)) +- [e2e] Deploy contracts directly seeding Ganache ([#14631](https://github.com/MetaMask/metamask-extension/pull/14631)) +- remove redundant code ([#15306](https://github.com/MetaMask/metamask-extension/pull/15306)) +- Fix stringified object on NFT approve screen ([#15287](https://github.com/MetaMask/metamask-extension/pull/15287)) +- Add responsive props to Box component ([#15106](https://github.com/MetaMask/metamask-extension/pull/15106)) +- DefinitionList story: convert knobs and actions to controls / args ([#15185](https://github.com/MetaMask/metamask-extension/pull/15185)) +- show asset name instead of symbol for setApprovalForAll calls on NFT contracts where possible ([#15296](https://github.com/MetaMask/metamask-extension/pull/15296)) +- mock contract interaction signature in e2e tests ([#15297](https://github.com/MetaMask/metamask-extension/pull/15297)) +- Adding artifacts ([#15145](https://github.com/MetaMask/metamask-extension/pull/15145)) +- Fix Provider Tracking Metrics ([#15082](https://github.com/MetaMask/metamask-extension/pull/15082)) +- Capturing load time stats ([#15157](https://github.com/MetaMask/metamask-extension/pull/15157)) +- Capturing lavamoat stats in E2E ([#15153](https://github.com/MetaMask/metamask-extension/pull/15153)) +- Remove usage of querystring from contentscript ([#15112](https://github.com/MetaMask/metamask-extension/pull/15112)) +- Remove web accessible resources from MV3 manifest ([#15238](https://github.com/MetaMask/metamask-extension/pull/15238)) +- Set default getFetchWithTimeout default timeout value ([#14218](https://github.com/MetaMask/metamask-extension/pull/14218)) +- Removed ui related code from shared directory ([#15252](https://github.com/MetaMask/metamask-extension/pull/15252)) +- [FLASK] `snaps-skunkworks@0.18.1` ([#15230](https://github.com/MetaMask/metamask-extension/pull/15230)) +- added storybook files to alert and breadcrumbs component ([#15156](https://github.com/MetaMask/metamask-extension/pull/15156)) +- Send to contract e2e ([#15276](https://github.com/MetaMask/metamask-extension/pull/15276)) +- added storybook component for send-content-stories ([#15210](https://github.com/MetaMask/metamask-extension/pull/15210)) +- Update Node.js version in README ([#15281](https://github.com/MetaMask/metamask-extension/pull/15281)) +- Remove dark mode and transaction insights announcements ([#15279](https://github.com/MetaMask/metamask-extension/pull/15279)) +- skip tests & fix build ([#15280](https://github.com/MetaMask/metamask-extension/pull/15280)) +- Fix invalid build timestamp on certain timezones ([#15245](https://github.com/MetaMask/metamask-extension/pull/15245)) +- Preserve send amount when editing an ERC20 transaction ([#15275](https://github.com/MetaMask/metamask-extension/pull/15275)) +- enable direct routing to the send page ([#15259](https://github.com/MetaMask/metamask-extension/pull/15259)) +- Add goerli, bsc, optimism, polygon, avalance, fantom, arbitrum network to query balances using BalanceChecker ([#13846](https://github.com/MetaMask/metamask-extension/pull/13846)) +- Fix the Sentry error for `eth_getBalance` ([#14953](https://github.com/MetaMask/metamask-extension/pull/14953)) +- Adding media query sass vars, mixins and docs ([#15053](https://github.com/MetaMask/metamask-extension/pull/15053)) +- add e2e test for token add approve action ([#13797](https://github.com/MetaMask/metamask-extension/pull/13797)) +- Bump controllers v30.0.2 ([#14906](https://github.com/MetaMask/metamask-extension/pull/14906)) +- Update the "results" state if "initialResultsState" array length is different ([#15270](https://github.com/MetaMask/metamask-extension/pull/15270)) +- Standardize spelling of 'cancelled' ([#15266](https://github.com/MetaMask/metamask-extension/pull/15266)) +- [E2E] Install Firefox extension from dist folder ([#15255](https://github.com/MetaMask/metamask-extension/pull/15255)) +- [E2E] quit mocha after test ([#15253](https://github.com/MetaMask/metamask-extension/pull/15253)) +- Only send the rpc origin to segment when calling trackevent for newly added custom networks ([#15227](https://github.com/MetaMask/metamask-extension/pull/15227)) +- small approve confirmation ui fixes ([#15239](https://github.com/MetaMask/metamask-extension/pull/15239)) +- Adding "What's New" Notification for Add Popular networks ([#15121](https://github.com/MetaMask/metamask-extension/pull/15121)) +- Remove 'ADD_POPULAR_NETWORKS' feature flag ([#15229](https://github.com/MetaMask/metamask-extension/pull/15229)) +- Removed the Infura v3 key from rpcUrl display ([#15193](https://github.com/MetaMask/metamask-extension/pull/15193)) +- Adding tasks for MV3 test build ([#15133](https://github.com/MetaMask/metamask-extension/pull/15133)) +- Show a block explorer URL hostname, hide token import if block explorer URL is not available ([#15198](https://github.com/MetaMask/metamask-extension/pull/15198)) +- Added metrics for adding a new network ([#15176](https://github.com/MetaMask/metamask-extension/pull/15176)) +- Improve confirm screen tests ([#15163](https://github.com/MetaMask/metamask-extension/pull/15163)) +- Support for ENS wildcard and offchain resolution ([#14675](https://github.com/MetaMask/metamask-extension/pull/14675)) +- removed i18nValue component ([#15179](https://github.com/MetaMask/metamask-extension/pull/15179)) +- Handling invalid prop `loading` console warning ([#15177](https://github.com/MetaMask/metamask-extension/pull/15177)) +- Update confirmation screen styling ([#15136](https://github.com/MetaMask/metamask-extension/pull/15136)) +- NicknamePopover story: convert knobs and actions to controls / args ([#15167](https://github.com/MetaMask/metamask-extension/pull/15167)) +- tabs story changes ([#15147](https://github.com/MetaMask/metamask-extension/pull/15147)) +- Show a tx link and the "create a new swap" link for STX ([#14995](https://github.com/MetaMask/metamask-extension/pull/14995)) ## [10.18.4] ### Changed @@ -3123,6 +3350,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added the ability to restore accounts from seed words. [Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v10.18.4...HEAD +[10.19.0]: https://github.com/MetaMask/metamask-extension/compare/v10.18.4...v10.19.0 [10.18.4]: https://github.com/MetaMask/metamask-extension/compare/v10.18.3...v10.18.4 [10.18.3]: https://github.com/MetaMask/metamask-extension/compare/v10.18.2...v10.18.3 [10.18.2]: https://github.com/MetaMask/metamask-extension/compare/v10.18.1...v10.18.2 diff --git a/package.json b/package.json index 8eb19a2d7..891e6332f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "metamask-crx", - "version": "10.18.4", + "version": "10.19.0", "private": true, "repository": { "type": "git", From 64391d346e4935ba4e0eac225221f3d9e652ca4c Mon Sep 17 00:00:00 2001 From: Adnan Sahovic <63151811+adnansahovic@users.noreply.github.com> Date: Thu, 8 Sep 2022 13:30:57 +0200 Subject: [PATCH 02/34] warning for deprecated Rinkeby, Ropsten and Kovan test networks (#15725) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * warning for deprecated Rinkeby, Ropsten and Kovan test networks * modified DeprecatedTestNetworks function * added getCompletedOnboarding * removed warning message from MetaMask ​​Notification page * updated deprecatedTestNetworksMsg --- app/_locales/en/messages.json | 6 ++ .../deprecated-test-networks.js | 82 +++++++++++++++++++ .../deprecated-test-networks.stories.js | 11 +++ .../ui/deprecated-test-networks/index.js | 1 + .../ui/deprecated-test-networks/index.scss | 25 ++++++ ui/components/ui/ui-components.scss | 1 + ui/pages/routes/routes.component.js | 6 ++ 7 files changed, 132 insertions(+) create mode 100644 ui/components/ui/deprecated-test-networks/deprecated-test-networks.js create mode 100644 ui/components/ui/deprecated-test-networks/deprecated-test-networks.stories.js create mode 100644 ui/components/ui/deprecated-test-networks/index.js create mode 100644 ui/components/ui/deprecated-test-networks/index.scss diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index be17b6130..955c8e20b 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -938,6 +938,12 @@ "message": "Deposit $1", "description": "$1 represents the crypto symbol to be purchased" }, + "deprecatedTestNetworksLink": { + "message": "Learn more" + }, + "deprecatedTestNetworksMsg": { + "message": "Due to the protocol changes of Ethereum: Rinkeby, Ropsten and Kovan test networks may not work as reliably and will be deprecated soon." + }, "description": { "message": "Description" }, diff --git a/ui/components/ui/deprecated-test-networks/deprecated-test-networks.js b/ui/components/ui/deprecated-test-networks/deprecated-test-networks.js new file mode 100644 index 000000000..42fd15fc6 --- /dev/null +++ b/ui/components/ui/deprecated-test-networks/deprecated-test-networks.js @@ -0,0 +1,82 @@ +import React, { useEffect, useState } from 'react'; +import { useSelector } from 'react-redux'; +import Button from '../button'; +import { useI18nContext } from '../../../hooks/useI18nContext'; +import { + DISPLAY, + JUSTIFY_CONTENT, + TYPOGRAPHY, + COLORS, +} from '../../../helpers/constants/design-system'; +import Box from '../box/box'; +import Typography from '../typography/typography'; +import ActionableMessage from '../actionable-message/actionable-message'; +import { getCurrentChainId } from '../../../selectors'; +import { getCompletedOnboarding } from '../../../ducks/metamask/metamask'; + +export default function DeprecatedTestNetworks() { + const currentChainID = useSelector(getCurrentChainId); + const [isShowingWarning, setIsShowingWarning] = useState(false); + const completedOnboarding = useSelector(getCompletedOnboarding); + const t = useI18nContext(); + + useEffect(() => { + if ( + completedOnboarding && + (currentChainID === '0x3' || + currentChainID === '0x2a' || + currentChainID === '0x4') + ) { + setIsShowingWarning(true); + } else { + setIsShowingWarning(false); + } + }, [currentChainID, completedOnboarding]); + + return ( + isShowingWarning && ( + + + + + + + {t('deprecatedTestNetworksMsg')} + + + + + setIsShowingWarning(false)} + /> + + + } + /> + ) + ); +} diff --git a/ui/components/ui/deprecated-test-networks/deprecated-test-networks.stories.js b/ui/components/ui/deprecated-test-networks/deprecated-test-networks.stories.js new file mode 100644 index 000000000..339c5109a --- /dev/null +++ b/ui/components/ui/deprecated-test-networks/deprecated-test-networks.stories.js @@ -0,0 +1,11 @@ +import React from 'react'; +import DeprecatedTestNetworks from './deprecated-test-networks'; + +export default { + title: 'Components/UI/DeprecatedTestNetworks', + id: __filename, +}; + +export const DefaultStory = () => ; + +DefaultStory.storyName = 'Default'; diff --git a/ui/components/ui/deprecated-test-networks/index.js b/ui/components/ui/deprecated-test-networks/index.js new file mode 100644 index 000000000..ab4291256 --- /dev/null +++ b/ui/components/ui/deprecated-test-networks/index.js @@ -0,0 +1 @@ +export { default } from './deprecated-test-networks'; diff --git a/ui/components/ui/deprecated-test-networks/index.scss b/ui/components/ui/deprecated-test-networks/index.scss new file mode 100644 index 000000000..1e02cc752 --- /dev/null +++ b/ui/components/ui/deprecated-test-networks/index.scss @@ -0,0 +1,25 @@ +.deprecated-test-networks { + position: fixed; + bottom: 0; + margin: 8px; + z-index: 1050; + + &__content { + &__icon { + font-size: 16px; + } + + &__inline-link { + @include H7; + + display: initial; + padding: 0; + } + + &__close::after { + content: '\00D7'; + font-size: 24px; + cursor: pointer; + } + } +} diff --git a/ui/components/ui/ui-components.scss b/ui/components/ui/ui-components.scss index c0770dfb0..2f004c47e 100644 --- a/ui/components/ui/ui-components.scss +++ b/ui/components/ui/ui-components.scss @@ -60,4 +60,5 @@ @import 'url-icon/index'; @import 'update-nickname-popover/index'; @import 'disclosure/disclosure'; +@import 'deprecated-test-networks/index.scss'; @import 'contract-token-values/index.scss'; diff --git a/ui/pages/routes/routes.component.js b/ui/pages/routes/routes.component.js index 24c16f4e2..b5a2fb816 100644 --- a/ui/pages/routes/routes.component.js +++ b/ui/pages/routes/routes.component.js @@ -77,6 +77,7 @@ import OnboardingFlow from '../onboarding-flow/onboarding-flow'; import QRHardwarePopover from '../../components/app/qr-hardware-popover'; import { SEND_STAGES } from '../../ducks/send'; import { THEME_TYPE } from '../settings/experimental-tab/experimental-tab.constant'; +import DeprecatedTestNetworks from '../../components/ui/deprecated-test-networks/deprecated-test-networks'; import NewNetworkInfo from '../../components/ui/new-network-info/new-network-info'; export default class Routes extends Component { @@ -372,6 +373,8 @@ export default class Routes extends Component { const shouldShowNetworkInfo = isUnlocked && !isNetworkUsed && hasAnAccountWithNoFundsOnNetwork; + const windowType = getEnvironmentType(); + return (
+ {windowType !== ENVIRONMENT_TYPE_NOTIFICATION && isUnlocked && ( + + )} {shouldShowNetworkInfo && } From 9529462740958e8cf8ce0fc97993fd0a0d2be0b8 Mon Sep 17 00:00:00 2001 From: Taylor Monahan <7924827+tayvano@users.noreply.github.com> Date: Mon, 12 Sep 2022 08:56:19 -0700 Subject: [PATCH 03/34] fix issue where signing a message sometimes doesn't allow you to scroll to the bottom (#15788) * fix issue wherein signing a message sometimes doesn't allow you to scroll all the way to the bottom done in a way to make it as mergeable as possible * Fixing length-zero-no-unit lint issue Co-authored-by: ryanml --- .../app/signature-request/signature-request-footer/index.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/components/app/signature-request/signature-request-footer/index.scss b/ui/components/app/signature-request/signature-request-footer/index.scss index 89fe1ffd2..0caf6a2be 100644 --- a/ui/components/app/signature-request/signature-request-footer/index.scss +++ b/ui/components/app/signature-request/signature-request-footer/index.scss @@ -1,6 +1,6 @@ .signature-request-footer { display: flex; - border-top: 1px solid var(--color-border-muted); + box-shadow: inset 0 1px 0 var(--color-border-muted); button { text-transform: uppercase; From e6f23e9dda5af213f20e0eed0a36198e2c0aa59c Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Tue, 13 Sep 2022 11:51:48 -0230 Subject: [PATCH 04/34] Update token detection whats new message: token detection is off by default (#15807) Co-authored-by: ryanml --- app/_locales/en/messages.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index 955c8e20b..fe8f9fdeb 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -2295,7 +2295,7 @@ "message": "Improved token detection is currently available on Ethereum Mainnet, Polygon, BSC, and Avalanche networks. More to come!" }, "notifications10DescriptionThree": { - "message": "Token detection feature is ON by default. But you can disable it from Settings." + "message": "Token detection feature is currently OFF by default. You can enable it from Settings." }, "notifications10DescriptionTwo": { "message": "We source tokens from third party tokens lists. Tokens listed on more than two token lists will be automatically detected." From a1673af6732fbfe7168dd296fb5761d461c75d59 Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Tue, 13 Sep 2022 11:57:02 -0230 Subject: [PATCH 05/34] Update whats new dates (#15804) Co-authored-by: ryanml --- shared/notifications/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shared/notifications/index.js b/shared/notifications/index.js index a721b2e00..389533366 100644 --- a/shared/notifications/index.js +++ b/shared/notifications/index.js @@ -48,7 +48,7 @@ export const UI_NOTIFICATIONS = { }, 10: { id: 10, - date: '2022-04-18', + date: '2022-09-15', image: { src: 'images/token-detection.svg', width: '100%', @@ -56,7 +56,7 @@ export const UI_NOTIFICATIONS = { }, 11: { id: 11, - date: '2022-04-18', + date: '2022-09-15', }, 12: { id: 12, @@ -68,7 +68,7 @@ export const UI_NOTIFICATIONS = { }, 13: { id: 13, - date: '2022-07-12', + date: '2022-09-15', }, }; From 527f56fa5fd30958ac24ec191b45f97f65735c9a Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Tue, 13 Sep 2022 22:29:04 -0230 Subject: [PATCH 06/34] Properly handle JSON errors when restoring data in advanced settings (#15815) --- app/_locales/en/messages.json | 3 ++ .../advanced-tab/advanced-tab.component.js | 48 +++++++++++++++---- 2 files changed, 42 insertions(+), 9 deletions(-) diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index fe8f9fdeb..8e51e30f3 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -893,6 +893,9 @@ "dataBackupFoundInfo": { "message": "Some of your account data was backed up during a previous installation of MetaMask. This could include your settings, contacts, and tokens. Would you like to restore this data now?" }, + "dataBackupSeemsCorrupt": { + "message": "Can not restore your data. The file appears to be corrupt." + }, "dataHex": { "message": "Hex" }, diff --git a/ui/pages/settings/advanced-tab/advanced-tab.component.js b/ui/pages/settings/advanced-tab/advanced-tab.component.js index 926a15448..d251822e8 100644 --- a/ui/pages/settings/advanced-tab/advanced-tab.component.js +++ b/ui/pages/settings/advanced-tab/advanced-tab.component.js @@ -25,6 +25,8 @@ import { exportAsFile } from '../../../../shared/modules/export-utils'; import ActionableMessage from '../../../components/ui/actionable-message'; import ZENDESK_URLS from '../../../helpers/constants/zendesk-url'; +const CORRUPT_JSON_FILE = 'CORRUPT_JSON_FILE'; + export default class AdvancedTab extends PureComponent { static contextTypes = { t: PropTypes.func, @@ -72,6 +74,7 @@ export default class AdvancedTab extends PureComponent { showLedgerTransportWarning: false, showResultMessage: false, restoreSuccessful: true, + restoreMessage: null, }; settingsRefs = Array( @@ -155,16 +158,35 @@ export default class AdvancedTab extends PureComponent { * */ event.target.value = ''; - const result = await this.props.restoreUserData(jsonString); - this.setState({ - showResultMessage: true, - restoreSuccessful: result, - }); + try { + const result = await this.props.restoreUserData(jsonString); + this.setState({ + showResultMessage: true, + restoreSuccessful: result, + restoreMessage: null, + }); + } catch (e) { + if (e.message.match(/Unexpected.+JSON/u)) { + this.setState({ + showResultMessage: true, + restoreSuccessful: false, + restoreMessage: CORRUPT_JSON_FILE, + }); + } + } } renderRestoreUserData() { const { t } = this.context; - const { showResultMessage, restoreSuccessful } = this.state; + const { showResultMessage, restoreSuccessful, restoreMessage } = this.state; + + const defaultRestoreMessage = restoreSuccessful + ? t('restoreSuccessful') + : t('restoreFailed'); + const restoreMessageToRender = + restoreMessage === CORRUPT_JSON_FILE + ? t('dataBackupSeemsCorrupt') + : defaultRestoreMessage; return (
{ + this.setState({ + showResultMessage: false, + restoreSuccessful: true, + restoreMessage: null, + }); + }, + }} /> )}
From ba11a4b5ad66478590ea65be723b02a026bba573 Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Wed, 14 Sep 2022 13:05:59 -0230 Subject: [PATCH 07/34] Ensure network info popup only displays on networks where the user has no balances (#15821) --- ui/pages/routes/routes.component.js | 11 ++++++++--- ui/pages/routes/routes.container.js | 7 ++++--- ui/selectors/selectors.js | 10 ++++++---- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/ui/pages/routes/routes.component.js b/ui/pages/routes/routes.component.js index b5a2fb816..f7ebd969c 100644 --- a/ui/pages/routes/routes.component.js +++ b/ui/pages/routes/routes.component.js @@ -107,7 +107,8 @@ export default class Routes extends Component { theme: PropTypes.string, sendStage: PropTypes.string, isNetworkUsed: PropTypes.bool, - hasAnAccountWithNoFundsOnNetwork: PropTypes.bool, + allAccountsOnNetworkAreEmpty: PropTypes.bool, + isTestNet: PropTypes.bool, }; static contextTypes = { @@ -363,7 +364,8 @@ export default class Routes extends Component { browserEnvironmentOs: os, browserEnvironmentBrowser: browser, isNetworkUsed, - hasAnAccountWithNoFundsOnNetwork, + allAccountsOnNetworkAreEmpty, + isTestNet, } = this.props; const loadMessage = loadingMessage || isNetworkLoading @@ -371,7 +373,10 @@ export default class Routes extends Component { : null; const shouldShowNetworkInfo = - isUnlocked && !isNetworkUsed && hasAnAccountWithNoFundsOnNetwork; + isUnlocked && + !isTestNet && + !isNetworkUsed && + allAccountsOnNetworkAreEmpty; const windowType = getEnvironmentType(); diff --git a/ui/pages/routes/routes.container.js b/ui/pages/routes/routes.container.js index 7e38f553c..8d02b1399 100644 --- a/ui/pages/routes/routes.container.js +++ b/ui/pages/routes/routes.container.js @@ -2,12 +2,13 @@ import { connect } from 'react-redux'; import { withRouter } from 'react-router-dom'; import { compose } from 'redux'; import { - getHasAnyAccountWithNoFundsOnNetwork, + getAllAccountsOnNetworkAreEmpty, getIsNetworkUsed, getNetworkIdentifier, getPreferences, isNetworkLoading, getTheme, + getIsTestnet, } from '../../selectors'; import { lockMetamask, @@ -43,8 +44,8 @@ function mapStateToProps(state) { theme: getTheme(state), sendStage: getSendStage(state), isNetworkUsed: getIsNetworkUsed(state), - hasAnAccountWithNoFundsOnNetwork: - getHasAnyAccountWithNoFundsOnNetwork(state), + allAccountsOnNetworkAreEmpty: getAllAccountsOnNetworkAreEmpty(state), + isTestnet: getIsTestnet(state), }; } diff --git a/ui/selectors/selectors.js b/ui/selectors/selectors.js index c9e3b9a6d..20461e3b2 100644 --- a/ui/selectors/selectors.js +++ b/ui/selectors/selectors.js @@ -1178,10 +1178,12 @@ export function getIsNetworkUsed(state) { return Boolean(usedNetworks[chainId]); } -export function getHasAnyAccountWithNoFundsOnNetwork(state) { +export function getAllAccountsOnNetworkAreEmpty(state) { const balances = getMetaMaskCachedBalances(state) ?? {}; - const hasAnAccountWithNoFundsOnNetwork = - Object.values(balances).indexOf('0x0'); + const hasNoNativeFundsOnAnyAccounts = Object.values(balances).every( + (balance) => balance === '0x0' || balance === '0x00', + ); + const hasNoTokens = getNumberOfTokens(state) === 0; - return hasAnAccountWithNoFundsOnNetwork !== -1; + return hasNoNativeFundsOnAnyAccounts && hasNoTokens; } From 7054dd669428592caf870292dd489cf7dc56b183 Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Wed, 14 Sep 2022 13:02:04 -0230 Subject: [PATCH 08/34] Ensure approval warning for setApprovalForAll is not shown when revoking (#15806) Co-authored-by: ryanml --- .../confirm-page-container.component.js | 4 +++- ui/pages/confirm-approve/confirm-approve.js | 1 + .../confirm-transaction-base.component.js | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ui/components/app/confirm-page-container/confirm-page-container.component.js b/ui/components/app/confirm-page-container/confirm-page-container.component.js index 8816d2e90..1da48f396 100644 --- a/ui/components/app/confirm-page-container/confirm-page-container.component.js +++ b/ui/components/app/confirm-page-container/confirm-page-container.component.js @@ -97,6 +97,7 @@ export default class ConfirmPageContainer extends Component { nativeCurrency: PropTypes.string, showBuyModal: PropTypes.func, isBuyableChain: PropTypes.bool, + setApproveForAllArg: PropTypes.bool, }; render() { @@ -153,6 +154,7 @@ export default class ConfirmPageContainer extends Component { showBuyModal, isBuyableChain, networkIdentifier, + setApproveForAllArg, } = this.props; const showAddToAddressDialog = @@ -306,7 +308,7 @@ export default class ConfirmPageContainer extends Component {
)} - {isSetApproveForAll && ( + {isSetApproveForAll && !setApproveForAllArg && ( {t('confirmPageDialogSetApprovalForAll')} diff --git a/ui/pages/confirm-approve/confirm-approve.js b/ui/pages/confirm-approve/confirm-approve.js index 1933d1b4f..59bac6bc1 100644 --- a/ui/pages/confirm-approve/confirm-approve.js +++ b/ui/pages/confirm-approve/confirm-approve.js @@ -172,6 +172,7 @@ export default function ConfirmApprove({ customTokenAmount={String(customPermissionAmount)} dappProposedTokenAmount={tokenAmount} currentTokenBalance={tokenBalance} + setApproveForAllArg={setApproveForAllArg} contentComponent={ ); From 222c5debf375a4768f61752e0de6c8bd735e6dee Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Wed, 14 Sep 2022 13:05:33 -0230 Subject: [PATCH 09/34] Ensure chainId is defined in validateRecipientUserInput in send-duck (#15822) --- ui/ducks/send/send.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/ducks/send/send.js b/ui/ducks/send/send.js index e224b1801..fa6b0a21c 100644 --- a/ui/ducks/send/send.js +++ b/ui/ducks/send/send.js @@ -2190,12 +2190,14 @@ export function useMyAccountsForRecipientSearch() { * @returns {ThunkAction} */ export function resetRecipientInput() { - return async (dispatch) => { + return async (dispatch, getState) => { + const state = getState(); + const chainId = getCurrentChainId(state); await dispatch(addHistoryEntry(`sendFlow - user cleared recipient input`)); await dispatch(updateRecipientUserInput('')); await dispatch(updateRecipient({ address: '', nickname: '' })); await dispatch(resetEnsResolution()); - await dispatch(validateRecipientUserInput()); + await dispatch(validateRecipientUserInput({ chainId })); }; } From 96a68019bf52a1d0581c35ff892c6dddd77e798e Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Wed, 14 Sep 2022 13:05:02 -0230 Subject: [PATCH 10/34] Move updateBackgroundConnection call in ui/index.js to before the action calls (#15826) --- ui/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/index.js b/ui/index.js index 1f258a817..5cac3b9b9 100644 --- a/ui/index.js +++ b/ui/index.js @@ -114,6 +114,8 @@ async function startApp(metamaskState, backgroundConnection, opts) { }, }; + updateBackgroundConnection(backgroundConnection); + if (getEnvironmentType() === ENVIRONMENT_TYPE_POPUP) { const { origin } = draftInitialState.activeTab; const permittedAccountsForCurrentTab = @@ -161,8 +163,6 @@ async function startApp(metamaskState, backgroundConnection, opts) { ); } - updateBackgroundConnection(backgroundConnection); - // global metamask api - used by tooling global.metamask = { updateCurrentLocale: (code) => { From b2f1c3f53e3d494c5c60befe48d6b1a4092acb08 Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Wed, 14 Sep 2022 13:04:46 -0230 Subject: [PATCH 11/34] Hide DetectedTokenAggregators if token.aggregators lists are empty (#15824) --- .../detected-token-details/detected-token-details.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/components/app/detected-token/detected-token-details/detected-token-details.js b/ui/components/app/detected-token/detected-token-details/detected-token-details.js index 0238b5a53..f939ba81c 100644 --- a/ui/components/app/detected-token/detected-token-details/detected-token-details.js +++ b/ui/components/app/detected-token/detected-token-details/detected-token-details.js @@ -35,7 +35,9 @@ const DetectedTokenDetails = ({ tokensListDetected={tokensListDetected} /> - + {token.aggregators.length && ( + + )} ); From 99e3721f1391e06b95e441f77b8b2d98ff3a69f3 Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Wed, 14 Sep 2022 13:05:14 -0230 Subject: [PATCH 12/34] Ensure that 'tokens found in this account' message is only shown when token detection activated (#15823) --- ui/components/app/asset-list/asset-list.js | 13 +++++-------- ui/selectors/selectors.js | 15 +++++++++++++++ 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/ui/components/app/asset-list/asset-list.js b/ui/components/app/asset-list/asset-list.js index a55ed3677..27b8664f6 100644 --- a/ui/components/app/asset-list/asset-list.js +++ b/ui/components/app/asset-list/asset-list.js @@ -11,7 +11,7 @@ import { getShouldShowFiat, getNativeCurrencyImage, getDetectedTokensInCurrentNetwork, - getIstokenDetectionInactiveOnNonMainnetSupportedNetwork, + getDisplayDetectedTokensLink, } from '../../../selectors'; import { getNativeCurrency } from '../../../ducks/metamask/metamask'; import { useCurrencyDisplay } from '../../../hooks/useCurrencyDisplay'; @@ -66,9 +66,7 @@ const AssetList = ({ onClickAsset }) => { const primaryTokenImage = useSelector(getNativeCurrencyImage); const detectedTokens = useSelector(getDetectedTokensInCurrentNetwork) || []; - const istokenDetectionInactiveOnNonMainnetSupportedNetwork = useSelector( - getIstokenDetectionInactiveOnNonMainnetSupportedNetwork, - ); + const displayDetectedTokensLink = useSelector(getDisplayDetectedTokensLink); return ( <> @@ -96,10 +94,9 @@ const AssetList = ({ onClickAsset }) => { }); }} /> - {detectedTokens.length > 0 && - !istokenDetectionInactiveOnNonMainnetSupportedNetwork && ( - - )} + {detectedTokens.length > 0 && displayDetectedTokensLink && ( + + )} 0 ? 0 : 4}> Date: Wed, 14 Sep 2022 11:26:45 -0700 Subject: [PATCH 13/34] Adding Sepolia as a default test network (#15787) --- .storybook/test-data.js | 12 +++++++++++ app/_locales/en/messages.json | 6 ++++++ app/scripts/constants/contracts.js | 2 ++ .../controllers/incoming-transactions.js | 3 +++ .../controllers/incoming-transactions.test.js | 4 ++++ .../network/network-controller.test.js | 4 ++++ app/scripts/lib/account-tracker.js | 9 ++++++++ app/scripts/lib/buy-url.js | 5 +++++ app/scripts/lib/ens-ipfs/resolver.js | 1 + development/states/navigate-txs.json | 3 ++- shared/constants/network.js | 21 +++++++++++++++++++ test/e2e/fixtures/address-entry/state.json | 1 + test/e2e/fixtures/connected-state/state.json | 1 + test/e2e/fixtures/custom-rpc/state.json | 1 + test/e2e/fixtures/eip-1559-v2-dapp/state.json | 1 + test/e2e/fixtures/eip-1559-v2/state.json | 1 + test/e2e/fixtures/imported-account/state.json | 1 + test/e2e/fixtures/localization/state.json | 1 + test/e2e/fixtures/metrics-enabled/state.json | 1 + .../fixtures/navigate-transactions/state.json | 1 + test/e2e/fixtures/send-edit-v2/state.json | 1 + test/e2e/fixtures/send-edit/state.json | 1 + test/e2e/fixtures/special-settings/state.json | 1 + test/e2e/mock-e2e.js | 1 + .../collectible-details.js | 2 ++ .../app/dropdowns/network-dropdown.js | 3 +++ .../app/dropdowns/network-dropdown.test.js | 7 ++++++- .../loading-network-screen.component.js | 2 ++ .../avatar-network/avatar-network.stories.js | 7 +++++++ .../avatar-token/avatar-token.stories.js | 7 +++++++ .../base-avatar/base-avatar.stories.js | 8 +++++++ ui/css/design-system/colors.scss | 1 + ui/css/itcss/components/network.scss | 4 ++++ ui/css/utilities/colors.scss | 1 + ui/helpers/constants/design-system.js | 3 +++ ui/helpers/constants/settings.js | 7 +++++++ ui/helpers/utils/settings-search.test.js | 4 +++- ui/helpers/utils/util.js | 2 ++ ui/pages/routes/routes.component.js | 2 ++ .../networks-list/networks-list.test.js | 1 + .../networks-tab-content.test.js | 1 + .../networks-tab/networks-tab.constants.js | 14 +++++++++++++ .../networks-tab/networks-tab.test.js | 1 + 43 files changed, 157 insertions(+), 3 deletions(-) diff --git a/.storybook/test-data.js b/.storybook/test-data.js index 44aca95a6..aff14eef8 100644 --- a/.storybook/test-data.js +++ b/.storybook/test-data.js @@ -70,6 +70,17 @@ const state = { ticker: 'ETH', viewOnly: true, }, + { + blockExplorerUrl: 'https://sepolia.etherscan.io', + chainId: '0xaa36a7', + iconColor: 'var(--sepolia)', + isATestNetwork: true, + labelKey: 'sepolia', + providerType: 'sepolia', + rpcUrl: 'https://sepolia.infura.io/v3/', + ticker: 'ETH', + viewOnly: true, + }, { blockExplorerUrl: '', chainId: '0x539', @@ -1310,6 +1321,7 @@ const state = { rinkeby: null, kovan: null, goerli: null, + sepolia: null, mainnet: 10902989, }, subjects: { diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index 8e51e30f3..d4f3b0e66 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -713,6 +713,9 @@ "connectingToRopsten": { "message": "Connecting to Ropsten test network" }, + "connectingToSepolia": { + "message": "Connecting to Sepolia test network" + }, "contactUs": { "message": "Contact us" }, @@ -3064,6 +3067,9 @@ "message": "Warning: you are about to send to a token contract which could result in a loss of funds. $1", "description": "$1 is a clickable link with text defined by the 'learnMoreUpperCase' key. The link will open to a support article regarding the known contract address warning" }, + "sepolia": { + "message": "Sepolia test network" + }, "setAdvancedPrivacySettings": { "message": "Set advanced privacy settings" }, diff --git a/app/scripts/constants/contracts.js b/app/scripts/constants/contracts.js index e822ccc7e..7afbba1f0 100644 --- a/app/scripts/constants/contracts.js +++ b/app/scripts/constants/contracts.js @@ -8,6 +8,8 @@ export const SINGLE_CALL_BALANCES_ADDRESS_KOVAN = '0xb1d3fbb2f83aecd196f474c16ca5d9cffa0d0ffc'; export const SINGLE_CALL_BALANCES_ADDRESS_GOERLI = '0x9788C4E93f9002a7ad8e72633b11E8d1ecd51f9b'; +// TODO(SEPOLIA) There is currently no balance call address for Sepolia +export const SINGLE_CALL_BALANCES_ADDRESS_SEPOLIA = ''; export const SINGLE_CALL_BALANCES_ADDRESS_BSC = '0x2352c63A83f9Fd126af8676146721Fa00924d7e4'; export const SINGLE_CALL_BALANCES_ADDRESS_OPTIMISM = diff --git a/app/scripts/controllers/incoming-transactions.js b/app/scripts/controllers/incoming-transactions.js index 1c264b97d..f1f81352b 100644 --- a/app/scripts/controllers/incoming-transactions.js +++ b/app/scripts/controllers/incoming-transactions.js @@ -17,6 +17,7 @@ import { MAINNET_CHAIN_ID, RINKEBY_CHAIN_ID, ROPSTEN_CHAIN_ID, + SEPOLIA_CHAIN_ID, } from '../../../shared/constants/network'; const fetchWithTimeout = getFetchWithTimeout(); @@ -58,6 +59,7 @@ const etherscanSupportedNetworks = [ MAINNET_CHAIN_ID, RINKEBY_CHAIN_ID, ROPSTEN_CHAIN_ID, + SEPOLIA_CHAIN_ID, ]; export default class IncomingTransactionsController { @@ -86,6 +88,7 @@ export default class IncomingTransactionsController { [MAINNET_CHAIN_ID]: null, [RINKEBY_CHAIN_ID]: null, [ROPSTEN_CHAIN_ID]: null, + [SEPOLIA_CHAIN_ID]: null, }, ...opts.initState, }; diff --git a/app/scripts/controllers/incoming-transactions.test.js b/app/scripts/controllers/incoming-transactions.test.js index ee6f559e9..5d1d86129 100644 --- a/app/scripts/controllers/incoming-transactions.test.js +++ b/app/scripts/controllers/incoming-transactions.test.js @@ -12,6 +12,7 @@ import { MAINNET_CHAIN_ID, RINKEBY_CHAIN_ID, ROPSTEN_CHAIN_ID, + SEPOLIA_CHAIN_ID, ROPSTEN_NETWORK_ID, ROPSTEN, } from '../../../shared/constants/network'; @@ -39,6 +40,7 @@ const PREPOPULATED_BLOCKS_BY_NETWORK = { [MAINNET_CHAIN_ID]: 3, [RINKEBY_CHAIN_ID]: 5, [ROPSTEN_CHAIN_ID]: 4, + [SEPOLIA_CHAIN_ID]: 6, }; const EMPTY_BLOCKS_BY_NETWORK = { [GOERLI_CHAIN_ID]: null, @@ -46,6 +48,7 @@ const EMPTY_BLOCKS_BY_NETWORK = { [MAINNET_CHAIN_ID]: null, [RINKEBY_CHAIN_ID]: null, [ROPSTEN_CHAIN_ID]: null, + [SEPOLIA_CHAIN_ID]: null, }; function getEmptyInitState() { @@ -153,6 +156,7 @@ function nockEtherscanApiForAllChains(mockResponse) { MAINNET_CHAIN_ID, RINKEBY_CHAIN_ID, ROPSTEN_CHAIN_ID, + SEPOLIA_CHAIN_ID, 'undefined', ]) { nock( diff --git a/app/scripts/controllers/network/network-controller.test.js b/app/scripts/controllers/network/network-controller.test.js index 0ff8f938f..ec47eefdc 100644 --- a/app/scripts/controllers/network/network-controller.test.js +++ b/app/scripts/controllers/network/network-controller.test.js @@ -177,6 +177,10 @@ describe('NetworkController', () => { input: 'goerli', expected: 'Goerli', }, + { + input: 'sepolia', + expected: 'Sepolia', + }, ]; tests.forEach(({ input, expected }) => diff --git a/app/scripts/lib/account-tracker.js b/app/scripts/lib/account-tracker.js index 8dea01fc9..e7a420a14 100644 --- a/app/scripts/lib/account-tracker.js +++ b/app/scripts/lib/account-tracker.js @@ -18,6 +18,7 @@ import { MAINNET_CHAIN_ID, RINKEBY_CHAIN_ID, ROPSTEN_CHAIN_ID, + SEPOLIA_CHAIN_ID, KOVAN_CHAIN_ID, GOERLI_CHAIN_ID, BSC_CHAIN_ID, @@ -34,6 +35,7 @@ import { SINGLE_CALL_BALANCES_ADDRESS_ROPSTEN, SINGLE_CALL_BALANCES_ADDRESS_KOVAN, SINGLE_CALL_BALANCES_ADDRESS_GOERLI, + SINGLE_CALL_BALANCES_ADDRESS_SEPOLIA, SINGLE_CALL_BALANCES_ADDRESS_BSC, SINGLE_CALL_BALANCES_ADDRESS_OPTIMISM, SINGLE_CALL_BALANCES_ADDRESS_POLYGON, @@ -251,6 +253,13 @@ export default class AccountTracker { ); break; + case SEPOLIA_CHAIN_ID: + await this._updateAccountsViaBalanceChecker( + addresses, + SINGLE_CALL_BALANCES_ADDRESS_SEPOLIA, + ); + break; + case BSC_CHAIN_ID: await this._updateAccountsViaBalanceChecker( addresses, diff --git a/app/scripts/lib/buy-url.js b/app/scripts/lib/buy-url.js index 579e0c51c..47b7163ba 100644 --- a/app/scripts/lib/buy-url.js +++ b/app/scripts/lib/buy-url.js @@ -7,6 +7,7 @@ import { MAINNET_CHAIN_ID, RINKEBY_CHAIN_ID, ROPSTEN_CHAIN_ID, + SEPOLIA_CHAIN_ID, BUYABLE_CHAINS_MAP, } from '../../../shared/constants/network'; import getFetchWithTimeout from '../../../shared/modules/fetch-with-timeout'; @@ -170,6 +171,8 @@ export default async function getBuyUrl({ chainId, address, service }) { return 'https://github.com/kovan-testnet/faucet'; case 'goerli-faucet': return 'https://goerli-faucet.slock.it/'; + case 'sepolia-faucet': + return 'https://faucet.sepolia.dev/'; default: throw new Error( `Unknown cryptocurrency exchange or faucet: "${service}"`, @@ -189,6 +192,8 @@ function getDefaultServiceForChain(chainId) { return 'kovan-faucet'; case GOERLI_CHAIN_ID: return 'goerli-faucet'; + case SEPOLIA_CHAIN_ID: + return 'sepolia-faucet'; default: throw new Error( `No default cryptocurrency exchange or faucet for chainId: "${chainId}"`, diff --git a/app/scripts/lib/ens-ipfs/resolver.js b/app/scripts/lib/ens-ipfs/resolver.js index 297b3e555..94136c5e5 100644 --- a/app/scripts/lib/ens-ipfs/resolver.js +++ b/app/scripts/lib/ens-ipfs/resolver.js @@ -79,6 +79,7 @@ function getRegistryForChainId(chainId) { case 3: case 4: case 5: + case 6: // Mainnet, Ropsten, Rinkeby, and Goerli, respectively, use the same address return '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e'; default: diff --git a/development/states/navigate-txs.json b/development/states/navigate-txs.json index 18281fd35..bf39420c1 100644 --- a/development/states/navigate-txs.json +++ b/development/states/navigate-txs.json @@ -309,7 +309,8 @@ "mainnet": "ok", "rinkeby": "ok", "ropsten": "ok", - "goerli": "ok" + "goerli": "ok", + "sepolia": "ok" } }, "send": { diff --git a/shared/constants/network.js b/shared/constants/network.js index cf653327c..be389b4d1 100644 --- a/shared/constants/network.js +++ b/shared/constants/network.js @@ -8,12 +8,14 @@ export const GOERLI = 'goerli'; export const LOCALHOST = 'localhost'; export const NETWORK_TYPE_RPC = 'rpc'; export const HOMESTEAD = 'homestead'; +export const SEPOLIA = 'sepolia'; export const MAINNET_NETWORK_ID = '1'; export const ROPSTEN_NETWORK_ID = '3'; export const RINKEBY_NETWORK_ID = '4'; export const GOERLI_NETWORK_ID = '5'; export const KOVAN_NETWORK_ID = '42'; +export const SEPOLIA_NETWORK_ID = '6'; export const LOCALHOST_NETWORK_ID = '1337'; export const MAINNET_CHAIN_ID = '0x1'; @@ -21,6 +23,7 @@ export const ROPSTEN_CHAIN_ID = '0x3'; export const RINKEBY_CHAIN_ID = '0x4'; export const GOERLI_CHAIN_ID = '0x5'; export const KOVAN_CHAIN_ID = '0x2a'; +export const SEPOLIA_CHAIN_ID = '0xaa36a7'; export const LOCALHOST_CHAIN_ID = '0x539'; export const BSC_CHAIN_ID = '0x38'; export const OPTIMISM_CHAIN_ID = '0xa'; @@ -44,6 +47,7 @@ export const RINKEBY_DISPLAY_NAME = 'Rinkeby'; export const KOVAN_DISPLAY_NAME = 'Kovan'; export const MAINNET_DISPLAY_NAME = 'Ethereum Mainnet'; export const GOERLI_DISPLAY_NAME = 'Goerli'; +export const SEPOLIA_DISPLAY_NAME = 'Sepolia'; export const LOCALHOST_DISPLAY_NAME = 'Localhost 8545'; export const BSC_DISPLAY_NAME = 'Binance Smart Chain'; export const POLYGON_DISPLAY_NAME = 'Polygon'; @@ -65,6 +69,7 @@ export const RINKEBY_RPC_URL = getRpcUrl({ network: RINKEBY }); export const KOVAN_RPC_URL = getRpcUrl({ network: KOVAN }); export const MAINNET_RPC_URL = getRpcUrl({ network: MAINNET }); export const GOERLI_RPC_URL = getRpcUrl({ network: GOERLI }); +export const SEPOLIA_RPC_URL = getRpcUrl({ network: SEPOLIA }); export const LOCALHOST_RPC_URL = 'http://localhost:8545'; export const ETH_SYMBOL = 'ETH'; @@ -98,6 +103,7 @@ export const TEST_CHAINS = [ GOERLI_CHAIN_ID, KOVAN_CHAIN_ID, LOCALHOST_CHAIN_ID, + SEPOLIA_CHAIN_ID, ]; export const TEST_NETWORK_TICKER_MAP = { @@ -105,6 +111,7 @@ export const TEST_NETWORK_TICKER_MAP = { [RINKEBY]: `${capitalize(RINKEBY)}${ETH_SYMBOL}`, [KOVAN]: `${capitalize(KOVAN)}${ETH_SYMBOL}`, [GOERLI]: `${capitalize(GOERLI)}${ETH_SYMBOL}`, + [SEPOLIA]: `${capitalize(SEPOLIA)}${ETH_SYMBOL}`, }; /** @@ -131,6 +138,11 @@ export const NETWORK_TYPE_TO_ID_MAP = { chainId: GOERLI_CHAIN_ID, ticker: TEST_NETWORK_TICKER_MAP[GOERLI], }, + [SEPOLIA]: { + networkId: SEPOLIA_NETWORK_ID, + chainId: SEPOLIA_CHAIN_ID, + ticker: TEST_NETWORK_TICKER_MAP[SEPOLIA], + }, [MAINNET]: { networkId: MAINNET_NETWORK_ID, chainId: MAINNET_CHAIN_ID, @@ -147,12 +159,14 @@ export const NETWORK_TO_NAME_MAP = { [KOVAN]: KOVAN_DISPLAY_NAME, [MAINNET]: MAINNET_DISPLAY_NAME, [GOERLI]: GOERLI_DISPLAY_NAME, + [SEPOLIA]: SEPOLIA_DISPLAY_NAME, [LOCALHOST]: LOCALHOST_DISPLAY_NAME, [ROPSTEN_NETWORK_ID]: ROPSTEN_DISPLAY_NAME, [RINKEBY_NETWORK_ID]: RINKEBY_DISPLAY_NAME, [KOVAN_NETWORK_ID]: KOVAN_DISPLAY_NAME, [GOERLI_NETWORK_ID]: GOERLI_DISPLAY_NAME, + [SEPOLIA_NETWORK_ID]: SEPOLIA_DISPLAY_NAME, [MAINNET_NETWORK_ID]: MAINNET_DISPLAY_NAME, [LOCALHOST_NETWORK_ID]: LOCALHOST_DISPLAY_NAME, @@ -160,6 +174,7 @@ export const NETWORK_TO_NAME_MAP = { [RINKEBY_CHAIN_ID]: RINKEBY_DISPLAY_NAME, [KOVAN_CHAIN_ID]: KOVAN_DISPLAY_NAME, [GOERLI_CHAIN_ID]: GOERLI_DISPLAY_NAME, + [SEPOLIA_CHAIN_ID]: SEPOLIA_DISPLAY_NAME, [MAINNET_CHAIN_ID]: MAINNET_DISPLAY_NAME, [LOCALHOST_CHAIN_ID]: LOCALHOST_DISPLAY_NAME, }; @@ -176,6 +191,7 @@ export const CHAIN_ID_TO_RPC_URL_MAP = { [RINKEBY_CHAIN_ID]: RINKEBY_RPC_URL, [KOVAN_CHAIN_ID]: KOVAN_RPC_URL, [GOERLI_CHAIN_ID]: GOERLI_RPC_URL, + [SEPOLIA_CHAIN_ID]: SEPOLIA_RPC_URL, [MAINNET_CHAIN_ID]: MAINNET_RPC_URL, [LOCALHOST_CHAIN_ID]: LOCALHOST_RPC_URL, }; @@ -197,6 +213,7 @@ export const NETWORK_ID_TO_ETHERS_NETWORK_NAME_MAP = { [ROPSTEN_NETWORK_ID]: ROPSTEN, [RINKEBY_NETWORK_ID]: RINKEBY, [GOERLI_NETWORK_ID]: GOERLI, + [SEPOLIA_NETWORK_ID]: SEPOLIA, [MAINNET_NETWORK_ID]: HOMESTEAD, }; @@ -286,6 +303,10 @@ export const BUYABLE_CHAINS_MAP = { nativeCurrency: TEST_NETWORK_TICKER_MAP[GOERLI], network: BUYABLE_CHAIN_ETHEREUM_NETWORK_NAME, }, + [SEPOLIA_CHAIN_ID]: { + nativeCurrency: TEST_NETWORK_TICKER_MAP[SEPOLIA], + network: BUYABLE_CHAIN_ETHEREUM_NETWORK_NAME, + }, [KOVAN_CHAIN_ID]: { nativeCurrency: TEST_NETWORK_TICKER_MAP[KOVAN], network: BUYABLE_CHAIN_ETHEREUM_NETWORK_NAME, diff --git a/test/e2e/fixtures/address-entry/state.json b/test/e2e/fixtures/address-entry/state.json index 481be663a..6f514b92d 100644 --- a/test/e2e/fixtures/address-entry/state.json +++ b/test/e2e/fixtures/address-entry/state.json @@ -34,6 +34,7 @@ "goerli": null, "kovan": null, "mainnet": null, + "sepolia": null, "rinkeby": 5570536 } }, diff --git a/test/e2e/fixtures/connected-state/state.json b/test/e2e/fixtures/connected-state/state.json index 3c1aa0039..5162e2183 100644 --- a/test/e2e/fixtures/connected-state/state.json +++ b/test/e2e/fixtures/connected-state/state.json @@ -23,6 +23,7 @@ "goerli": null, "kovan": null, "mainnet": null, + "sepolia": null, "rinkeby": 5570536, "localhost": 98 } diff --git a/test/e2e/fixtures/custom-rpc/state.json b/test/e2e/fixtures/custom-rpc/state.json index 28ca1894a..acf928b88 100644 --- a/test/e2e/fixtures/custom-rpc/state.json +++ b/test/e2e/fixtures/custom-rpc/state.json @@ -20,6 +20,7 @@ "goerli": null, "kovan": null, "mainnet": null, + "sepolia": null, "rinkeby": 5570536 } }, diff --git a/test/e2e/fixtures/eip-1559-v2-dapp/state.json b/test/e2e/fixtures/eip-1559-v2-dapp/state.json index 373645f1f..5b590231a 100644 --- a/test/e2e/fixtures/eip-1559-v2-dapp/state.json +++ b/test/e2e/fixtures/eip-1559-v2-dapp/state.json @@ -21,6 +21,7 @@ "goerli": null, "kovan": null, "mainnet": null, + "sepolia": null, "rinkeby": 5570536 } }, diff --git a/test/e2e/fixtures/eip-1559-v2/state.json b/test/e2e/fixtures/eip-1559-v2/state.json index 1346dea32..63ec5f814 100644 --- a/test/e2e/fixtures/eip-1559-v2/state.json +++ b/test/e2e/fixtures/eip-1559-v2/state.json @@ -21,6 +21,7 @@ "goerli": null, "kovan": null, "mainnet": null, + "sepolia": null, "rinkeby": 5570536 } }, diff --git a/test/e2e/fixtures/imported-account/state.json b/test/e2e/fixtures/imported-account/state.json index 4506bac2d..bd867deff 100644 --- a/test/e2e/fixtures/imported-account/state.json +++ b/test/e2e/fixtures/imported-account/state.json @@ -20,6 +20,7 @@ "goerli": null, "kovan": null, "mainnet": null, + "sepolia": null, "rinkeby": 5570536 } }, diff --git a/test/e2e/fixtures/localization/state.json b/test/e2e/fixtures/localization/state.json index 80f442a04..f62ceee9b 100644 --- a/test/e2e/fixtures/localization/state.json +++ b/test/e2e/fixtures/localization/state.json @@ -20,6 +20,7 @@ "goerli": null, "kovan": null, "mainnet": null, + "sepolia": null, "rinkeby": 5570536 } }, diff --git a/test/e2e/fixtures/metrics-enabled/state.json b/test/e2e/fixtures/metrics-enabled/state.json index a6c7d7be0..0fae6b9d5 100644 --- a/test/e2e/fixtures/metrics-enabled/state.json +++ b/test/e2e/fixtures/metrics-enabled/state.json @@ -23,6 +23,7 @@ "goerli": null, "kovan": null, "mainnet": null, + "sepolia": null, "rinkeby": 5570536, "localhost": 98 } diff --git a/test/e2e/fixtures/navigate-transactions/state.json b/test/e2e/fixtures/navigate-transactions/state.json index 1d654f7ac..117c74f09 100644 --- a/test/e2e/fixtures/navigate-transactions/state.json +++ b/test/e2e/fixtures/navigate-transactions/state.json @@ -20,6 +20,7 @@ "goerli": null, "kovan": null, "mainnet": null, + "sepolia": null, "rinkeby": 5570536 } }, diff --git a/test/e2e/fixtures/send-edit-v2/state.json b/test/e2e/fixtures/send-edit-v2/state.json index 14bc11d12..721bcfdd1 100644 --- a/test/e2e/fixtures/send-edit-v2/state.json +++ b/test/e2e/fixtures/send-edit-v2/state.json @@ -21,6 +21,7 @@ "goerli": null, "kovan": null, "mainnet": null, + "sepolia": null, "rinkeby": 5570536 } }, diff --git a/test/e2e/fixtures/send-edit/state.json b/test/e2e/fixtures/send-edit/state.json index 5606126f8..c9ab754f3 100644 --- a/test/e2e/fixtures/send-edit/state.json +++ b/test/e2e/fixtures/send-edit/state.json @@ -21,6 +21,7 @@ "goerli": null, "kovan": null, "mainnet": null, + "sepolia": null, "rinkeby": 5570536 } }, diff --git a/test/e2e/fixtures/special-settings/state.json b/test/e2e/fixtures/special-settings/state.json index 668c4143f..a665e01ce 100644 --- a/test/e2e/fixtures/special-settings/state.json +++ b/test/e2e/fixtures/special-settings/state.json @@ -20,6 +20,7 @@ "goerli": null, "kovan": null, "mainnet": null, + "sepolia": null, "rinkeby": 5570536 } }, diff --git a/test/e2e/mock-e2e.js b/test/e2e/mock-e2e.js index 590cdffe9..785ec4c00 100644 --- a/test/e2e/mock-e2e.js +++ b/test/e2e/mock-e2e.js @@ -4,6 +4,7 @@ const blacklistedHosts = [ 'mainnet.infura.io', 'rinkeby.infura.io', 'ropsten.infura.io', + 'sepolia.infura.io', ]; async function setupMocking(server, testSpecificMock) { diff --git a/ui/components/app/collectible-details/collectible-details.js b/ui/components/app/collectible-details/collectible-details.js index b50dd6062..7ad4b2622 100644 --- a/ui/components/app/collectible-details/collectible-details.js +++ b/ui/components/app/collectible-details/collectible-details.js @@ -40,6 +40,7 @@ import { POLYGON_CHAIN_ID, RINKEBY_CHAIN_ID, ROPSTEN_CHAIN_ID, + SEPOLIA_CHAIN_ID, } from '../../../../shared/constants/network'; import { getEnvironmentType } from '../../../../app/scripts/lib/util'; import { ENVIRONMENT_TYPE_POPUP } from '../../../../shared/constants/app'; @@ -107,6 +108,7 @@ export default function CollectibleDetails({ collectible }) { case KOVAN_CHAIN_ID: case ROPSTEN_CHAIN_ID: case RINKEBY_CHAIN_ID: + case SEPOLIA_CHAIN_ID: return `https://testnets.opensea.io/assets/${address}/${tokenId}`; default: return null; diff --git a/ui/components/app/dropdowns/network-dropdown.js b/ui/components/app/dropdowns/network-dropdown.js index c6b89fe5e..db35c3009 100644 --- a/ui/components/app/dropdowns/network-dropdown.js +++ b/ui/components/app/dropdowns/network-dropdown.js @@ -225,6 +225,8 @@ class NetworkDropdown extends Component { name = this.context.t('rinkeby'); } else if (providerName === 'goerli') { name = this.context.t('goerli'); + } else if (providerName === 'sepolia') { + name = this.context.t('sepolia'); } else if (providerName === 'localhost') { name = this.context.t('localhost'); } else { @@ -358,6 +360,7 @@ class NetworkDropdown extends Component { {this.renderNetworkEntry('kovan')} {this.renderNetworkEntry('rinkeby')} {this.renderNetworkEntry('goerli')} + {this.renderNetworkEntry('sepolia')} {this.renderCustomRpcList( rpcListDetailForLocalHost, this.props.provider, diff --git a/ui/components/app/dropdowns/network-dropdown.test.js b/ui/components/app/dropdowns/network-dropdown.test.js index 2d4d5a3dc..61a19bd96 100644 --- a/ui/components/app/dropdowns/network-dropdown.test.js +++ b/ui/components/app/dropdowns/network-dropdown.test.js @@ -102,6 +102,11 @@ describe('Network Dropdown', () => { }); it('checks background color for sixth ColorIndicator', () => { + const sepoliaColorIndicator = screen.queryByTestId('color-icon-sepolia'); + expect(sepoliaColorIndicator).toBeInTheDocument(); + }); + + it('checks background color for seventh ColorIndicator', () => { const localhostColorIndicator = screen.queryByTestId( 'color-icon-localhost', ); @@ -116,7 +121,7 @@ describe('Network Dropdown', () => { it('shows test networks in the dropdown', () => { const networkItems = screen.queryAllByTestId(/network-item/u); - expect(networkItems).toHaveLength(8); + expect(networkItems).toHaveLength(9); }); }); diff --git a/ui/components/app/loading-network-screen/loading-network-screen.component.js b/ui/components/app/loading-network-screen/loading-network-screen.component.js index 3da052d14..598d80245 100644 --- a/ui/components/app/loading-network-screen/loading-network-screen.component.js +++ b/ui/components/app/loading-network-screen/loading-network-screen.component.js @@ -51,6 +51,8 @@ export default class LoadingNetworkScreen extends PureComponent { name = this.context.t('connectingToRinkeby'); } else if (providerName === 'goerli') { name = this.context.t('connectingToGoerli'); + } else if (providerName === 'sepolia') { + name = this.context.t('connectingToSepolia'); } else { name = this.context.t('connectingTo', [providerId]); } diff --git a/ui/components/component-library/avatar-network/avatar-network.stories.js b/ui/components/component-library/avatar-network/avatar-network.stories.js index b8eafc496..81ca71c49 100644 --- a/ui/components/component-library/avatar-network/avatar-network.stories.js +++ b/ui/components/component-library/avatar-network/avatar-network.stories.js @@ -109,6 +109,13 @@ export const ColorBackgroundColorAndBorderColor = (args) => ( networkName="G" color={COLORS.PRIMARY_INVERSE} // This will have to be added to the BaseAvatar component as a prop so we can change the color of the text and to the base avatar /> + ( tokenName="G" color={COLORS.PRIMARY_INVERSE} // TODO: This will have to be added to the BaseAvatar component as a prop so we can change the color of the text and to the base avatar /> + ( > G + + S + t('networks'), + sectionMessage: (t) => t('sepolia'), + descriptionMessage: (t) => t('sepolia'), + route: `${NETWORKS_ROUTE}#networks-sepolia`, + icon: 'fa fa-plug', + }, { tabMessage: (t) => t('networks'), sectionMessage: (t) => t('kovan'), diff --git a/ui/helpers/utils/settings-search.test.js b/ui/helpers/utils/settings-search.test.js index 73e92c129..fbfc69b29 100644 --- a/ui/helpers/utils/settings-search.test.js +++ b/ui/helpers/utils/settings-search.test.js @@ -105,6 +105,8 @@ const t = (key) => { return 'Rinkeby test network'; case 'goerli': return 'Goerli test network'; + case 'sepolia': + return 'Sepolia test network'; case 'kovan': return 'Kovan test network'; case 'localhost': @@ -185,7 +187,7 @@ describe('Settings Search Utils', () => { }); it('should get good network section number', () => { - expect(getNumberOfSettingsInSection(t, t('networks'))).toStrictEqual(6); + expect(getNumberOfSettingsInSection(t, t('networks'))).toStrictEqual(7); }); it('should get good experimental section number', () => { diff --git a/ui/helpers/utils/util.js b/ui/helpers/utils/util.js index 86aabc98f..68b9649fa 100644 --- a/ui/helpers/utils/util.js +++ b/ui/helpers/utils/util.js @@ -13,6 +13,7 @@ import { MAINNET_CHAIN_ID, RINKEBY_CHAIN_ID, ROPSTEN_CHAIN_ID, + SEPOLIA_CHAIN_ID, } from '../../../shared/constants/network'; import { toChecksumHexAddress } from '../../../shared/modules/hexstring-utils'; import { @@ -57,6 +58,7 @@ export function isDefaultMetaMaskChain(chainId) { chainId === RINKEBY_CHAIN_ID || chainId === KOVAN_CHAIN_ID || chainId === GOERLI_CHAIN_ID || + chainId === SEPOLIA_CHAIN_ID || chainId === LOCALHOST_CHAIN_ID ) { return true; diff --git a/ui/pages/routes/routes.component.js b/ui/pages/routes/routes.component.js index f7ebd969c..14b2e1e15 100644 --- a/ui/pages/routes/routes.component.js +++ b/ui/pages/routes/routes.component.js @@ -460,6 +460,8 @@ export default class Routes extends Component { return this.context.t('connectingToRinkeby'); case 'goerli': return this.context.t('connectingToGoerli'); + case 'sepolia': + return this.context.t('connectingToSepolia'); default: return this.context.t('connectingTo', [providerId]); } diff --git a/ui/pages/settings/networks-tab/networks-list/networks-list.test.js b/ui/pages/settings/networks-tab/networks-list/networks-list.test.js index 99d7ed03c..332fe5826 100644 --- a/ui/pages/settings/networks-tab/networks-list/networks-list.test.js +++ b/ui/pages/settings/networks-tab/networks-list/networks-list.test.js @@ -44,6 +44,7 @@ describe('NetworksList Component', () => { expect(queryByText('Ropsten test network')).toBeInTheDocument(); expect(queryByText('Rinkeby test network')).toBeInTheDocument(); expect(queryByText('Goerli test network')).toBeInTheDocument(); + expect(queryByText('Sepolia test network')).toBeInTheDocument(); expect(queryByText('Kovan test network')).toBeInTheDocument(); }); }); diff --git a/ui/pages/settings/networks-tab/networks-tab-content/networks-tab-content.test.js b/ui/pages/settings/networks-tab/networks-tab-content/networks-tab-content.test.js index 090126136..cf65aff73 100644 --- a/ui/pages/settings/networks-tab/networks-tab-content/networks-tab-content.test.js +++ b/ui/pages/settings/networks-tab/networks-tab-content/networks-tab-content.test.js @@ -55,6 +55,7 @@ describe('NetworksTabContent Component', () => { expect(queryByText('Ropsten test network')).toBeInTheDocument(); expect(queryByText('Rinkeby test network')).toBeInTheDocument(); expect(queryByText('Goerli test network')).toBeInTheDocument(); + expect(queryByText('Sepolia test network')).toBeInTheDocument(); expect(queryByText('Kovan test network')).toBeInTheDocument(); expect(queryByText('Network name')).toBeInTheDocument(); diff --git a/ui/pages/settings/networks-tab/networks-tab.constants.js b/ui/pages/settings/networks-tab/networks-tab.constants.js index 669a97839..8b0576986 100644 --- a/ui/pages/settings/networks-tab/networks-tab.constants.js +++ b/ui/pages/settings/networks-tab/networks-tab.constants.js @@ -9,6 +9,8 @@ import { RINKEBY_CHAIN_ID, ROPSTEN, ROPSTEN_CHAIN_ID, + SEPOLIA, + SEPOLIA_CHAIN_ID, getRpcUrl, ETH_SYMBOL, TEST_NETWORK_TICKER_MAP, @@ -51,6 +53,18 @@ const defaultNetworksData = [ ticker: TEST_NETWORK_TICKER_MAP[GOERLI], blockExplorerUrl: 'https://goerli.etherscan.io', }, + { + labelKey: SEPOLIA, + iconColor: '#CFB5F0', + providerType: SEPOLIA, + rpcUrl: getRpcUrl({ + network: SEPOLIA, + excludeProjectId: true, + }), + chainId: SEPOLIA_CHAIN_ID, + ticker: TEST_NETWORK_TICKER_MAP[SEPOLIA], + blockExplorerUrl: 'https://sepolia.etherscan.io', + }, { labelKey: KOVAN, iconColor: '#9064FF', diff --git a/ui/pages/settings/networks-tab/networks-tab.test.js b/ui/pages/settings/networks-tab/networks-tab.test.js index 42d53b385..2a97fe416 100644 --- a/ui/pages/settings/networks-tab/networks-tab.test.js +++ b/ui/pages/settings/networks-tab/networks-tab.test.js @@ -35,6 +35,7 @@ describe('NetworksTab Component', () => { expect(queryByText('Ropsten test network')).toBeInTheDocument(); expect(queryByText('Rinkeby test network')).toBeInTheDocument(); expect(queryByText('Goerli test network')).toBeInTheDocument(); + expect(queryByText('Sepolia test network')).toBeInTheDocument(); expect(queryByText('Kovan test network')).toBeInTheDocument(); expect(queryByText('Add network')).toBeInTheDocument(); }); From 5316fc682e0423c5577f5b6aa7e38ff70c6e9711 Mon Sep 17 00:00:00 2001 From: Olusegun Akintayo Date: Tue, 13 Sep 2022 22:51:46 +0400 Subject: [PATCH 14/34] Show 3box deprecation message in whats new (#15763) * Show 3box deprecation message in whats new Signed-off-by: Akintayo A. Olusegun * Add . after message Signed-off-by: Akintayo A. Olusegun * Change deprecation notification message and remove date Signed-off-by: Akintayo A. Olusegun Signed-off-by: Akintayo A. Olusegun --- app/_locales/en/messages.json | 10 ++++++++++ shared/notifications/index.js | 15 +++++++++++++++ test/e2e/fixtures/address-entry/state.json | 3 +++ test/e2e/fixtures/connected-state/state.json | 3 +++ test/e2e/fixtures/custom-rpc/state.json | 3 +++ test/e2e/fixtures/custom-token/state.json | 3 +++ test/e2e/fixtures/eip-1559-v2-dapp/state.json | 3 +++ test/e2e/fixtures/eip-1559-v2/state.json | 3 +++ test/e2e/fixtures/import-ui/state.json | 3 +++ test/e2e/fixtures/imported-account/state.json | 3 +++ test/e2e/fixtures/localization/state.json | 3 +++ test/e2e/fixtures/metrics-enabled/state.json | 3 +++ .../e2e/fixtures/navigate-transactions/state.json | 3 +++ test/e2e/fixtures/onboarding/state.json | 3 +++ test/e2e/fixtures/send-edit-v2/state.json | 3 +++ test/e2e/fixtures/send-edit/state.json | 3 +++ test/e2e/fixtures/special-settings/state.json | 3 +++ test/e2e/fixtures/threebox-enabled/state.json | 3 +++ .../app/whats-new-popup/whats-new-popup.js | 4 ++++ ui/selectors/selectors.js | 2 ++ 20 files changed, 79 insertions(+) diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index d4f3b0e66..3ebc7c3fe 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -2334,6 +2334,16 @@ "notifications13Title": { "message": "Add Popular Networks" }, + "notifications14ActionText": { + "message": "Show backup settings" + }, + "notifications14Description": { + "message": "We're deprecating our 3Box data feature in early October. To backup and restore your wallet manually, use the \"Backup now\" button in Advanced Settings.", + "description": "Description of a notification in the 'See What's New' popup. Describes 3box deprecation." + }, + "notifications14Title": { + "message": "3Box Deprecation" + }, "notifications1Description": { "message": "MetaMask Mobile users can now swap tokens inside their mobile wallet. Scan the QR code to get the mobile app and start swapping.", "description": "Description of a notification in the 'See What's New' popup. Describes the swapping on mobile feature." diff --git a/shared/notifications/index.js b/shared/notifications/index.js index 389533366..4d4325e1d 100644 --- a/shared/notifications/index.js +++ b/shared/notifications/index.js @@ -70,6 +70,10 @@ export const UI_NOTIFICATIONS = { id: 13, date: '2022-09-15', }, + 14: { + id: 14, + date: null, + }, }; export const getTranslatedUINotifications = (t, locale) => { @@ -195,5 +199,16 @@ export const getTranslatedUINotifications = (t, locale) => { new Date(UI_NOTIFICATIONS[13].date), ), }, + 14: { + ...UI_NOTIFICATIONS[14], + title: t('notifications14Title'), + description: t('notifications14Description'), + actionText: t('notifications14ActionText'), + date: UI_NOTIFICATIONS[14].date + ? new Intl.DateTimeFormat(formattedLocale).format( + new Date(UI_NOTIFICATIONS[14].date), + ) + : '', + }, }; }; diff --git a/test/e2e/fixtures/address-entry/state.json b/test/e2e/fixtures/address-entry/state.json index 6f514b92d..fcd464900 100644 --- a/test/e2e/fixtures/address-entry/state.json +++ b/test/e2e/fixtures/address-entry/state.json @@ -79,6 +79,9 @@ }, "13": { "isShown": true + }, + "14": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/connected-state/state.json b/test/e2e/fixtures/connected-state/state.json index 5162e2183..e0c27264e 100644 --- a/test/e2e/fixtures/connected-state/state.json +++ b/test/e2e/fixtures/connected-state/state.json @@ -69,6 +69,9 @@ }, "13": { "isShown": true + }, + "14": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/custom-rpc/state.json b/test/e2e/fixtures/custom-rpc/state.json index acf928b88..9aae513b6 100644 --- a/test/e2e/fixtures/custom-rpc/state.json +++ b/test/e2e/fixtures/custom-rpc/state.json @@ -65,6 +65,9 @@ }, "13": { "isShown": true + }, + "14": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/custom-token/state.json b/test/e2e/fixtures/custom-token/state.json index 4546a6ede..6013db122 100644 --- a/test/e2e/fixtures/custom-token/state.json +++ b/test/e2e/fixtures/custom-token/state.json @@ -82,6 +82,9 @@ }, "13": { "isShown": true + }, + "14": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/eip-1559-v2-dapp/state.json b/test/e2e/fixtures/eip-1559-v2-dapp/state.json index 5b590231a..8c52dd45f 100644 --- a/test/e2e/fixtures/eip-1559-v2-dapp/state.json +++ b/test/e2e/fixtures/eip-1559-v2-dapp/state.json @@ -66,6 +66,9 @@ }, "13": { "isShown": true + }, + "14": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/eip-1559-v2/state.json b/test/e2e/fixtures/eip-1559-v2/state.json index 63ec5f814..d5fcb62f7 100644 --- a/test/e2e/fixtures/eip-1559-v2/state.json +++ b/test/e2e/fixtures/eip-1559-v2/state.json @@ -66,6 +66,9 @@ }, "13": { "isShown": true + }, + "14": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/import-ui/state.json b/test/e2e/fixtures/import-ui/state.json index 3d0c40c08..c8921ee5e 100644 --- a/test/e2e/fixtures/import-ui/state.json +++ b/test/e2e/fixtures/import-ui/state.json @@ -119,6 +119,9 @@ }, "13": { "isShown": true + }, + "14": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/imported-account/state.json b/test/e2e/fixtures/imported-account/state.json index bd867deff..3805dc636 100644 --- a/test/e2e/fixtures/imported-account/state.json +++ b/test/e2e/fixtures/imported-account/state.json @@ -65,6 +65,9 @@ }, "13": { "isShown": true + }, + "14": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/localization/state.json b/test/e2e/fixtures/localization/state.json index f62ceee9b..0b96e54c0 100644 --- a/test/e2e/fixtures/localization/state.json +++ b/test/e2e/fixtures/localization/state.json @@ -65,6 +65,9 @@ }, "13": { "isShown": true + }, + "14": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/metrics-enabled/state.json b/test/e2e/fixtures/metrics-enabled/state.json index 0fae6b9d5..38569ec40 100644 --- a/test/e2e/fixtures/metrics-enabled/state.json +++ b/test/e2e/fixtures/metrics-enabled/state.json @@ -69,6 +69,9 @@ }, "13": { "isShown": true + }, + "14": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/navigate-transactions/state.json b/test/e2e/fixtures/navigate-transactions/state.json index 117c74f09..9123d3a9b 100644 --- a/test/e2e/fixtures/navigate-transactions/state.json +++ b/test/e2e/fixtures/navigate-transactions/state.json @@ -65,6 +65,9 @@ }, "13": { "isShown": true + }, + "14": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/onboarding/state.json b/test/e2e/fixtures/onboarding/state.json index a616fc720..32d270bd3 100644 --- a/test/e2e/fixtures/onboarding/state.json +++ b/test/e2e/fixtures/onboarding/state.json @@ -39,6 +39,9 @@ }, "13": { "isShown": true + }, + "14": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/send-edit-v2/state.json b/test/e2e/fixtures/send-edit-v2/state.json index 721bcfdd1..f18eaf5c2 100644 --- a/test/e2e/fixtures/send-edit-v2/state.json +++ b/test/e2e/fixtures/send-edit-v2/state.json @@ -66,6 +66,9 @@ }, "13": { "isShown": true + }, + "14": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/send-edit/state.json b/test/e2e/fixtures/send-edit/state.json index c9ab754f3..0df44fd78 100644 --- a/test/e2e/fixtures/send-edit/state.json +++ b/test/e2e/fixtures/send-edit/state.json @@ -66,6 +66,9 @@ }, "13": { "isShown": true + }, + "14": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/special-settings/state.json b/test/e2e/fixtures/special-settings/state.json index a665e01ce..1fdb61bb1 100644 --- a/test/e2e/fixtures/special-settings/state.json +++ b/test/e2e/fixtures/special-settings/state.json @@ -59,6 +59,9 @@ }, "13": { "isShown": true + }, + "14": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/threebox-enabled/state.json b/test/e2e/fixtures/threebox-enabled/state.json index 44bc352a9..57b5ae345 100644 --- a/test/e2e/fixtures/threebox-enabled/state.json +++ b/test/e2e/fixtures/threebox-enabled/state.json @@ -75,6 +75,9 @@ }, "13": { "isShown": true + }, + "14": { + "isShown": true } } }, diff --git a/ui/components/app/whats-new-popup/whats-new-popup.js b/ui/components/app/whats-new-popup/whats-new-popup.js index fe1eb1d4b..a0b950eab 100644 --- a/ui/components/app/whats-new-popup/whats-new-popup.js +++ b/ui/components/app/whats-new-popup/whats-new-popup.js @@ -58,6 +58,10 @@ function getActionFunctionById(id, history) { updateViewedNotifications({ 13: true }); history.push(`${EXPERIMENTAL_ROUTE}#show-custom-network`); }, + 14: () => { + updateViewedNotifications({ 14: true }); + history.push(`${ADVANCED_ROUTE}#backup-userdata`); + }, }; return actionFunctions[id]; diff --git a/ui/selectors/selectors.js b/ui/selectors/selectors.js index 33c18cc89..13b259f9c 100644 --- a/ui/selectors/selectors.js +++ b/ui/selectors/selectors.js @@ -817,6 +817,7 @@ function getAllowedAnnouncementIds(state) { const supportsWebHid = window.navigator.hid !== undefined; const currentlyUsingLedgerLive = getLedgerTransportType(state) === LEDGER_TRANSPORT_TYPES.LIVE; + const { threeBoxSyncingAllowed } = state.metamask; return { 1: false, @@ -832,6 +833,7 @@ function getAllowedAnnouncementIds(state) { 11: true, 12: false, 13: true, + 14: threeBoxSyncingAllowed, }; } From c35b4d6ec872140671f1de6b862629fce8e7effe Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Thu, 15 Sep 2022 12:51:01 -0230 Subject: [PATCH 15/34] Add notification about the merge (#15846) --- app/_locales/en/messages.json | 7 +++++++ shared/notifications/index.js | 16 +++++++++++++++- test/e2e/fixtures/address-entry/state.json | 3 +++ test/e2e/fixtures/connected-state/state.json | 3 +++ test/e2e/fixtures/custom-rpc/state.json | 3 +++ test/e2e/fixtures/custom-token/state.json | 3 +++ test/e2e/fixtures/eip-1559-v2-dapp/state.json | 3 +++ test/e2e/fixtures/eip-1559-v2/state.json | 3 +++ test/e2e/fixtures/import-ui/state.json | 3 +++ test/e2e/fixtures/imported-account/state.json | 3 +++ test/e2e/fixtures/localization/state.json | 3 +++ test/e2e/fixtures/metrics-enabled/state.json | 3 +++ .../fixtures/navigate-transactions/state.json | 3 +++ test/e2e/fixtures/onboarding/state.json | 3 +++ test/e2e/fixtures/send-edit-v2/state.json | 3 +++ test/e2e/fixtures/send-edit/state.json | 3 +++ test/e2e/fixtures/special-settings/state.json | 3 +++ test/e2e/fixtures/threebox-enabled/state.json | 3 +++ ui/selectors/selectors.js | 1 + 19 files changed, 71 insertions(+), 1 deletion(-) diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index 3ebc7c3fe..a289f128e 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -2344,6 +2344,13 @@ "notifications14Title": { "message": "3Box Deprecation" }, + "notifications15Description": { + "message": "There's no action required from you, so keep using your wallet as usual. Be aware of potential scams around the Merge.", + "description": "Description of a notification in the 'See What's New' popup. Advises users about the ethereum merge (https://ethereum.org/en/upgrades/merge/#main-content) and potential scams." + }, + "notifications15Title": { + "message": "The Ethereum Merge is here!" + }, "notifications1Description": { "message": "MetaMask Mobile users can now swap tokens inside their mobile wallet. Scan the QR code to get the mobile app and start swapping.", "description": "Description of a notification in the 'See What's New' popup. Describes the swapping on mobile feature." diff --git a/shared/notifications/index.js b/shared/notifications/index.js index 4d4325e1d..9a3cb0351 100644 --- a/shared/notifications/index.js +++ b/shared/notifications/index.js @@ -72,7 +72,11 @@ export const UI_NOTIFICATIONS = { }, 14: { id: 14, - date: null, + date: '2022-09-15', + }, + 15: { + id: 15, + date: '2022-09-15', }, }; @@ -210,5 +214,15 @@ export const getTranslatedUINotifications = (t, locale) => { ) : '', }, + 15: { + ...UI_NOTIFICATIONS[15], + title: t('notifications15Title'), + description: t('notifications15Description'), + date: UI_NOTIFICATIONS[15].date + ? new Intl.DateTimeFormat(formattedLocale).format( + new Date(UI_NOTIFICATIONS[15].date), + ) + : '', + }, }; }; diff --git a/test/e2e/fixtures/address-entry/state.json b/test/e2e/fixtures/address-entry/state.json index fcd464900..03ed534bd 100644 --- a/test/e2e/fixtures/address-entry/state.json +++ b/test/e2e/fixtures/address-entry/state.json @@ -82,6 +82,9 @@ }, "14": { "isShown": true + }, + "15": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/connected-state/state.json b/test/e2e/fixtures/connected-state/state.json index e0c27264e..e29020a90 100644 --- a/test/e2e/fixtures/connected-state/state.json +++ b/test/e2e/fixtures/connected-state/state.json @@ -72,6 +72,9 @@ }, "14": { "isShown": true + }, + "15": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/custom-rpc/state.json b/test/e2e/fixtures/custom-rpc/state.json index 9aae513b6..ecd4ea5dc 100644 --- a/test/e2e/fixtures/custom-rpc/state.json +++ b/test/e2e/fixtures/custom-rpc/state.json @@ -68,6 +68,9 @@ }, "14": { "isShown": true + }, + "15": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/custom-token/state.json b/test/e2e/fixtures/custom-token/state.json index 6013db122..ea408f952 100644 --- a/test/e2e/fixtures/custom-token/state.json +++ b/test/e2e/fixtures/custom-token/state.json @@ -85,6 +85,9 @@ }, "14": { "isShown": true + }, + "15": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/eip-1559-v2-dapp/state.json b/test/e2e/fixtures/eip-1559-v2-dapp/state.json index 8c52dd45f..1a6149f20 100644 --- a/test/e2e/fixtures/eip-1559-v2-dapp/state.json +++ b/test/e2e/fixtures/eip-1559-v2-dapp/state.json @@ -69,6 +69,9 @@ }, "14": { "isShown": true + }, + "15": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/eip-1559-v2/state.json b/test/e2e/fixtures/eip-1559-v2/state.json index d5fcb62f7..e44ba2a37 100644 --- a/test/e2e/fixtures/eip-1559-v2/state.json +++ b/test/e2e/fixtures/eip-1559-v2/state.json @@ -69,6 +69,9 @@ }, "14": { "isShown": true + }, + "15": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/import-ui/state.json b/test/e2e/fixtures/import-ui/state.json index c8921ee5e..80ab5894a 100644 --- a/test/e2e/fixtures/import-ui/state.json +++ b/test/e2e/fixtures/import-ui/state.json @@ -122,6 +122,9 @@ }, "14": { "isShown": true + }, + "15": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/imported-account/state.json b/test/e2e/fixtures/imported-account/state.json index 3805dc636..2a5849f2e 100644 --- a/test/e2e/fixtures/imported-account/state.json +++ b/test/e2e/fixtures/imported-account/state.json @@ -68,6 +68,9 @@ }, "14": { "isShown": true + }, + "15": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/localization/state.json b/test/e2e/fixtures/localization/state.json index 0b96e54c0..7b8d4ae27 100644 --- a/test/e2e/fixtures/localization/state.json +++ b/test/e2e/fixtures/localization/state.json @@ -68,6 +68,9 @@ }, "14": { "isShown": true + }, + "15": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/metrics-enabled/state.json b/test/e2e/fixtures/metrics-enabled/state.json index 38569ec40..7a4c864a5 100644 --- a/test/e2e/fixtures/metrics-enabled/state.json +++ b/test/e2e/fixtures/metrics-enabled/state.json @@ -72,6 +72,9 @@ }, "14": { "isShown": true + }, + "15": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/navigate-transactions/state.json b/test/e2e/fixtures/navigate-transactions/state.json index 9123d3a9b..a9faca5ba 100644 --- a/test/e2e/fixtures/navigate-transactions/state.json +++ b/test/e2e/fixtures/navigate-transactions/state.json @@ -68,6 +68,9 @@ }, "14": { "isShown": true + }, + "15": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/onboarding/state.json b/test/e2e/fixtures/onboarding/state.json index 32d270bd3..9bd17bc72 100644 --- a/test/e2e/fixtures/onboarding/state.json +++ b/test/e2e/fixtures/onboarding/state.json @@ -42,6 +42,9 @@ }, "14": { "isShown": true + }, + "15": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/send-edit-v2/state.json b/test/e2e/fixtures/send-edit-v2/state.json index f18eaf5c2..830976631 100644 --- a/test/e2e/fixtures/send-edit-v2/state.json +++ b/test/e2e/fixtures/send-edit-v2/state.json @@ -69,6 +69,9 @@ }, "14": { "isShown": true + }, + "15": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/send-edit/state.json b/test/e2e/fixtures/send-edit/state.json index 0df44fd78..8c5a4658e 100644 --- a/test/e2e/fixtures/send-edit/state.json +++ b/test/e2e/fixtures/send-edit/state.json @@ -69,6 +69,9 @@ }, "14": { "isShown": true + }, + "15": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/special-settings/state.json b/test/e2e/fixtures/special-settings/state.json index 1fdb61bb1..2f0297cc2 100644 --- a/test/e2e/fixtures/special-settings/state.json +++ b/test/e2e/fixtures/special-settings/state.json @@ -62,6 +62,9 @@ }, "14": { "isShown": true + }, + "15": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/threebox-enabled/state.json b/test/e2e/fixtures/threebox-enabled/state.json index 57b5ae345..a2e4229a4 100644 --- a/test/e2e/fixtures/threebox-enabled/state.json +++ b/test/e2e/fixtures/threebox-enabled/state.json @@ -78,6 +78,9 @@ }, "14": { "isShown": true + }, + "15": { + "isShown": true } } }, diff --git a/ui/selectors/selectors.js b/ui/selectors/selectors.js index 13b259f9c..4a63ca187 100644 --- a/ui/selectors/selectors.js +++ b/ui/selectors/selectors.js @@ -834,6 +834,7 @@ function getAllowedAnnouncementIds(state) { 12: false, 13: true, 14: threeBoxSyncingAllowed, + 15: true, }; } From 06fc3a1dd5693f9c3314e29ff7bec8e1fec33bd9 Mon Sep 17 00:00:00 2001 From: Niranjana Binoy <43930900+NiranjanaBinoy@users.noreply.github.com> Date: Thu, 15 Sep 2022 11:23:18 -0400 Subject: [PATCH 16/34] Displaying the aggregators from tokenList in Detected token popover (#15835) * using the aggregators from tokenList instead of detectedToken to avoid conflicts between static and dynamic list * removing aggregator from the detectTokens object List --- .storybook/test-data.js | 4 +-- app/scripts/controllers/detect-tokens.js | 3 +-- app/scripts/controllers/detect-tokens.test.js | 10 +++---- .../detected-token-details.js | 9 +++++-- .../detected-token-details.test.js | 2 +- .../app/detected-token/detected-token.test.js | 26 +++++++++---------- 6 files changed, 28 insertions(+), 26 deletions(-) diff --git a/.storybook/test-data.js b/.storybook/test-data.js index aff14eef8..e087b6990 100644 --- a/.storybook/test-data.js +++ b/.storybook/test-data.js @@ -174,8 +174,8 @@ const state = { name: 'Falconswap', iconUrl: 'https://assets.coingecko.com/coins/images/12256/thumb/falconswap.png?1598534184', - aggregators: ['CoinGecko', '1inch', 'Paraswap', 'Zapper', 'Zerion'], - occurrences: 12, + aggregators: ['CoinGecko', '1inch', 'Lifi'], + occurrences:3, unlisted: false, }, '0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f': { diff --git a/app/scripts/controllers/detect-tokens.js b/app/scripts/controllers/detect-tokens.js index daef5c7ac..0b8ffeede 100644 --- a/app/scripts/controllers/detect-tokens.js +++ b/app/scripts/controllers/detect-tokens.js @@ -152,7 +152,7 @@ export default class DetectTokensController { if (result) { const nonZeroTokenAddresses = Object.keys(result); for (const nonZeroTokenAddress of nonZeroTokenAddresses) { - const { address, symbol, decimals, aggregators } = + const { address, symbol, decimals } = tokenListUsed[nonZeroTokenAddress]; eventTokensDetails.push(`${symbol} - ${address}`); @@ -161,7 +161,6 @@ export default class DetectTokensController { address, symbol, decimals, - aggregators, }); } diff --git a/app/scripts/controllers/detect-tokens.test.js b/app/scripts/controllers/detect-tokens.test.js index 4f1e0334a..f0ec07954 100644 --- a/app/scripts/controllers/detect-tokens.test.js +++ b/app/scripts/controllers/detect-tokens.test.js @@ -249,7 +249,7 @@ describe('DetectTokensController', function () { address: tokenValues[0].address, symbol: tokenValues[0].symbol, decimals: tokenValues[0].decimals, - aggregators: tokenValues[0].aggregators, + aggregators: undefined, image: undefined, isERC721: undefined, }, @@ -270,7 +270,7 @@ describe('DetectTokensController', function () { address: toChecksumHexAddress(tokenValues[0].address), decimals: tokenValues[0].decimals, symbol: tokenValues[0].symbol, - aggregators: tokenValues[0].aggregators, + aggregators: undefined, image: undefined, isERC721: undefined, }, @@ -303,7 +303,7 @@ describe('DetectTokensController', function () { address: existingToken.address, symbol: existingToken.symbol, decimals: existingToken.decimals, - aggregators: existingToken.aggregators, + aggregators: undefined, image: undefined, isERC721: undefined, }, @@ -321,7 +321,7 @@ describe('DetectTokensController', function () { address: toChecksumHexAddress(existingTokenAddress), decimals: existingToken.decimals, symbol: existingToken.symbol, - aggregators: existingToken.aggregators, + aggregators: undefined, image: undefined, isERC721: undefined, }, @@ -329,7 +329,7 @@ describe('DetectTokensController', function () { address: toChecksumHexAddress(tokenAddressToAdd), decimals: tokenToAdd.decimals, symbol: tokenToAdd.symbol, - aggregators: tokenToAdd.aggregators, + aggregators: undefined, image: undefined, isERC721: undefined, }, diff --git a/ui/components/app/detected-token/detected-token-details/detected-token-details.js b/ui/components/app/detected-token/detected-token-details/detected-token-details.js index f939ba81c..7bd87f5b4 100644 --- a/ui/components/app/detected-token/detected-token-details/detected-token-details.js +++ b/ui/components/app/detected-token/detected-token-details/detected-token-details.js @@ -1,5 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; +import { useSelector } from 'react-redux'; import Box from '../../../ui/box'; import Identicon from '../../../ui/identicon'; @@ -7,12 +8,16 @@ import DetectedTokenValues from '../detected-token-values/detected-token-values' import DetectedTokenAddress from '../detected-token-address/detected-token-address'; import DetectedTokenAggregators from '../detected-token-aggregators/detected-token-aggregators'; import { DISPLAY } from '../../../../helpers/constants/design-system'; +import { getTokenList } from '../../../../selectors'; const DetectedTokenDetails = ({ token, handleTokenSelection, tokensListDetected, }) => { + const tokenList = useSelector(getTokenList); + const tokenData = tokenList[token.address?.toLowerCase()]; + return ( - {token.aggregators.length && ( - + {tokenData?.aggregators.length > 0 && ( + )} diff --git a/ui/components/app/detected-token/detected-token-details/detected-token-details.test.js b/ui/components/app/detected-token/detected-token-details/detected-token-details.test.js index 456633317..f767d560f 100644 --- a/ui/components/app/detected-token/detected-token-details/detected-token-details.test.js +++ b/ui/components/app/detected-token/detected-token-details/detected-token-details.test.js @@ -87,7 +87,7 @@ describe('DetectedTokenDetails', () => { fireEvent.click(screen.getByText('+ 10 more')); expect( screen.getByText( - 'Aave, Bancor, CMC, Crypto.com, CoinGecko, 1Inch, Paraswap, PMM, Synthetix, Zapper, Zerion, 0x.', + 'Aave, Bancor, CMC, Crypto.com, CoinGecko, 1inch, Paraswap, PMM, Synthetix, Zapper, Zerion, 0x.', ), ).toBeInTheDocument(); }); diff --git a/ui/components/app/detected-token/detected-token.test.js b/ui/components/app/detected-token/detected-token.test.js index e130708f4..34358ffbb 100644 --- a/ui/components/app/detected-token/detected-token.test.js +++ b/ui/components/app/detected-token/detected-token.test.js @@ -23,27 +23,25 @@ describe('DetectedToken', () => { expect(screen.getByText('0xc00...6888')).toBeInTheDocument(); expect(screen.getByText('0xfff...26DB')).toBeInTheDocument(); expect(screen.getAllByText('From token lists:')).toHaveLength(3); - expect(screen.getByText('coinGecko, oneInch')).toBeInTheDocument(); - expect(screen.getByText('+ 3 more')).toBeInTheDocument(); - fireEvent.click(screen.getByText('+ 3 more')); - expect( - screen.getByText('coinGecko, oneInch, paraswap, zapper, zerion.'), - ).toBeInTheDocument(); - expect(screen.getByText('bancor, cmc')).toBeInTheDocument(); - expect(screen.getByText('+ 8 more')).toBeInTheDocument(); - fireEvent.click(screen.getByText('+ 8 more')); + expect(screen.getByText('Aave, Bancor')).toBeInTheDocument(); + expect(screen.getByText('+ 9 more')).toBeInTheDocument(); + fireEvent.click(screen.getByText('+ 9 more')); expect( screen.getByText( - 'bancor, cmc, cryptocom, coinGecko, oneInch, paraswap, pmm, zapper, zerion, zeroEx.', + 'Aave, Bancor, CMC, Crypto.com, CoinGecko, 1inch, Paraswap, PMM, Zapper, Zerion, 0x.', ), ).toBeInTheDocument(); - expect(screen.getByText('aave, cmc')).toBeInTheDocument(); - expect(screen.getByText('+ 5 more')).toBeInTheDocument(); - fireEvent.click(screen.getByText('+ 5 more')); + expect(screen.getByText('Bancor, CMC')).toBeInTheDocument(); + expect(screen.getByText('+ 8 more')).toBeInTheDocument(); + fireEvent.click(screen.getByText('+ 8 more')); expect( screen.getByText( - 'aave, cmc, coinGecko, oneInch, paraswap, zapper, zerion.', + 'Bancor, CMC, Crypto.com, CoinGecko, 1inch, Paraswap, PMM, Zapper, Zerion, 0x.', ), ).toBeInTheDocument(); + expect(screen.getByText('CoinGecko, 1inch')).toBeInTheDocument(); + expect(screen.getByText('+ 1 more')).toBeInTheDocument(); + fireEvent.click(screen.getByText('+ 1 more')); + expect(screen.getByText('CoinGecko, 1inch, Lifi.')).toBeInTheDocument(); }); }); From 3047c3ab24442a718f3252a0220e7fc2d284247c Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Mon, 12 Sep 2022 17:05:41 -0400 Subject: [PATCH 17/34] Resolve inconsistency between browsers (#15800) Resolve an inconsistency between Chrome and Firefox with how the contentscript runs in an iframe. This should have no user-facing impact, it's just meant as a safeguard in case something unintentionally gets included in the contentscript. --- app/manifest/v2/chrome.json | 1 + app/manifest/v3/chrome.json | 3 +++ 2 files changed, 4 insertions(+) diff --git a/app/manifest/v2/chrome.json b/app/manifest/v2/chrome.json index e4bb01cdd..9a2d91271 100644 --- a/app/manifest/v2/chrome.json +++ b/app/manifest/v2/chrome.json @@ -1,4 +1,5 @@ { + "content_security_policy": "frame-ancestors 'none'", "externally_connectable": { "matches": ["https://metamask.io/*"], "ids": ["*"] diff --git a/app/manifest/v3/chrome.json b/app/manifest/v3/chrome.json index e4bb01cdd..9e21aa058 100644 --- a/app/manifest/v3/chrome.json +++ b/app/manifest/v3/chrome.json @@ -1,4 +1,7 @@ { + "content_security_policy": { + "extension_pages": "default-src 'self'; frame-ancestors 'none'" + }, "externally_connectable": { "matches": ["https://metamask.io/*"], "ids": ["*"] From d5c3dbce95a516d916b9bd5e9e6f0767c37276bf Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Thu, 15 Sep 2022 14:24:55 -0230 Subject: [PATCH 18/34] Fix sepolia network id (#15847) --- shared/constants/network.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/constants/network.js b/shared/constants/network.js index be389b4d1..1aba39579 100644 --- a/shared/constants/network.js +++ b/shared/constants/network.js @@ -15,7 +15,7 @@ export const ROPSTEN_NETWORK_ID = '3'; export const RINKEBY_NETWORK_ID = '4'; export const GOERLI_NETWORK_ID = '5'; export const KOVAN_NETWORK_ID = '42'; -export const SEPOLIA_NETWORK_ID = '6'; +export const SEPOLIA_NETWORK_ID = '11155111'; export const LOCALHOST_NETWORK_ID = '1337'; export const MAINNET_CHAIN_ID = '0x1'; From 5f21cbeefffa66e32cf0ffe583daf6220506574b Mon Sep 17 00:00:00 2001 From: Dan Miller Date: Thu, 15 Sep 2022 20:42:50 -0230 Subject: [PATCH 19/34] Fix bug introduced when resolving conflict during cherry-pick of 7ffcad3328 --- shared/constants/network.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/shared/constants/network.js b/shared/constants/network.js index 1aba39579..2f60d19a2 100644 --- a/shared/constants/network.js +++ b/shared/constants/network.js @@ -95,13 +95,21 @@ export const HARMONY_ONE_TOKEN_IMAGE_URL = './images/harmony-one.svg'; export const OPTIMISM_TOKEN_IMAGE_URL = './images/optimism.svg'; export const PALM_TOKEN_IMAGE_URL = './images/palm.svg'; -export const INFURA_PROVIDER_TYPES = [ROPSTEN, RINKEBY, KOVAN, MAINNET, GOERLI]; +export const INFURA_PROVIDER_TYPES = [ + ROPSTEN, + RINKEBY, + KOVAN, + MAINNET, + GOERLI, + SEPOLIA, +]; export const TEST_CHAINS = [ ROPSTEN_CHAIN_ID, RINKEBY_CHAIN_ID, GOERLI_CHAIN_ID, KOVAN_CHAIN_ID, + SEPOLIA_RPC_URL, LOCALHOST_CHAIN_ID, SEPOLIA_CHAIN_ID, ]; From 6bd284a01677717ef3b70cbc46d1ad3beaa0a77a Mon Sep 17 00:00:00 2001 From: PeterYinusa <53189696+PeterYinusa@users.noreply.github.com> Date: Wed, 14 Sep 2022 18:16:21 +0100 Subject: [PATCH 20/34] Case insensitive modifier for Firefox (#15831) JSON.parse: unexpected character at line 1 column 1 of the JSON data JSON.parse: unexpected end of data at line 1 column 1 of the JSON data --- ui/pages/settings/advanced-tab/advanced-tab.component.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/pages/settings/advanced-tab/advanced-tab.component.js b/ui/pages/settings/advanced-tab/advanced-tab.component.js index d251822e8..c6ed0606f 100644 --- a/ui/pages/settings/advanced-tab/advanced-tab.component.js +++ b/ui/pages/settings/advanced-tab/advanced-tab.component.js @@ -166,7 +166,7 @@ export default class AdvancedTab extends PureComponent { restoreMessage: null, }); } catch (e) { - if (e.message.match(/Unexpected.+JSON/u)) { + if (e.message.match(/Unexpected.+JSON/iu)) { this.setState({ showResultMessage: true, restoreSuccessful: false, From dc1b658348a8d0940673e48030329113bd0a8584 Mon Sep 17 00:00:00 2001 From: Matthew Epps Date: Tue, 13 Sep 2022 06:41:58 -0700 Subject: [PATCH 21/34] Add entry point for metalabs dapp into metamask home page (#15407) Co-authored-by: Dan Miller --- .metamaskrc.dist | 1 + app/_locales/en/messages.json | 15 ++++ app/scripts/controllers/app-state.js | 10 +++ app/scripts/metamask-controller.js | 2 + development/build/scripts.js | 1 + shared/constants/metametrics.js | 1 + test/e2e/fixtures/address-entry/state.json | 3 +- test/e2e/fixtures/connected-state/state.json | 3 +- test/e2e/fixtures/custom-rpc/state.json | 3 +- test/e2e/fixtures/custom-token/state.json | 3 +- test/e2e/fixtures/eip-1559-v2-dapp/state.json | 3 +- test/e2e/fixtures/eip-1559-v2/state.json | 3 +- test/e2e/fixtures/import-ui/state.json | 3 +- test/e2e/fixtures/imported-account/state.json | 3 +- test/e2e/fixtures/localization/state.json | 3 +- test/e2e/fixtures/metrics-enabled/state.json | 3 +- .../fixtures/navigate-transactions/state.json | 3 +- test/e2e/fixtures/send-edit-v2/state.json | 3 +- test/e2e/fixtures/send-edit/state.json | 3 +- test/e2e/fixtures/special-settings/state.json | 3 +- test/e2e/fixtures/threebox-enabled/state.json | 3 +- ui/components/ui/icon/icon-chart.js | 45 ++++++++++ ui/components/ui/tabs/tabs.component.js | 5 +- ui/components/ui/tooltip/tooltip.js | 4 + ui/ducks/app/app.js | 17 ++++ ui/pages/home/home.component.js | 82 ++++++++++++++++++- ui/pages/home/home.container.js | 10 +++ ui/pages/home/index.scss | 52 ++++++++++++ ui/selectors/selectors.js | 4 + ui/store/actionConstants.js | 3 +- ui/store/actions.js | 4 + 31 files changed, 281 insertions(+), 20 deletions(-) create mode 100644 ui/components/ui/icon/icon-chart.js diff --git a/.metamaskrc.dist b/.metamaskrc.dist index 0554ac85e..2cb654cfb 100644 --- a/.metamaskrc.dist +++ b/.metamaskrc.dist @@ -8,6 +8,7 @@ COLLECTIBLES_V1= PUBNUB_PUB_KEY= PUBNUB_SUB_KEY= TOKEN_ALLOWANCE_IMPROVEMENTS= +PORTFOLIO_URL= ; Set this to '1' to enable support for Sign-In with Ethereum [EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) SIWE_V1= diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index a289f128e..6240896e7 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -451,6 +451,9 @@ "betaMetamaskVersion": { "message": "MetaMask Beta Version" }, + "betaPortfolioSite": { + "message": "beta portfolio site" + }, "betaWelcome": { "message": "Welcome to MetaMask Beta" }, @@ -1778,6 +1781,9 @@ "message": "JSON File", "description": "format for importing an account" }, + "keepTapsOnTokens": { + "message": "to keep tabs on your tokens and NFTs across accounts and networks." + }, "keystone": { "message": "Keystone" }, @@ -2164,6 +2170,9 @@ "nevermind": { "message": "Nevermind" }, + "new": { + "message": "New!" + }, "newAccount": { "message": "New account" }, @@ -2676,6 +2685,9 @@ "popularCustomNetworks": { "message": "Popular custom networks" }, + "portfolioSite": { + "message": "Portfolio site" + }, "preferredLedgerConnectionType": { "message": "Preferred Ledger connection type", "description": "A header for a dropdown in Settings > Advanced. Appears above the ledgerConnectionPreferenceDescription message" @@ -4097,6 +4109,9 @@ "tryAgain": { "message": "Try again" }, + "tryOur": { + "message": "Try our" + }, "turnOnTokenDetection": { "message": "Turn on enhanced token detection" }, diff --git a/app/scripts/controllers/app-state.js b/app/scripts/controllers/app-state.js index 4dee8a8c3..5dfdc2f70 100644 --- a/app/scripts/controllers/app-state.js +++ b/app/scripts/controllers/app-state.js @@ -33,6 +33,7 @@ export default class AppStateController extends EventEmitter { collectiblesDetectionNoticeDismissed: false, enableEIP1559V2NoticeDismissed: false, showTestnetMessageInDropdown: true, + showPortfolioTooltip: true, trezorModel: null, ...initState, qrHardware: {}, @@ -259,6 +260,15 @@ export default class AppStateController extends EventEmitter { this.store.updateState({ showTestnetMessageInDropdown }); } + /** + * Sets whether the portfolio site tooltip should be shown on the home page + * + * @param showPortfolioTooltip + */ + setShowPortfolioTooltip(showPortfolioTooltip) { + this.store.updateState({ showPortfolioTooltip }); + } + /** * Sets a property indicating the model of the user's Trezor hardware wallet * diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 4b115d834..453f6cd1e 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -1727,6 +1727,8 @@ export default class MetamaskController extends EventEmitter { appStateController.setShowTestnetMessageInDropdown.bind( appStateController, ), + setShowPortfolioTooltip: + appStateController.setShowPortfolioTooltip.bind(appStateController), setCollectiblesDetectionNoticeDismissed: appStateController.setCollectiblesDetectionNoticeDismissed.bind( appStateController, diff --git a/development/build/scripts.js b/development/build/scripts.js index 86a324ad4..eca8bee2c 100644 --- a/development/build/scripts.js +++ b/development/build/scripts.js @@ -1023,6 +1023,7 @@ async function getEnvironmentVariables({ buildTarget, buildType, version }) { environment, testing, }), + PORTFOLIO_URL: ENVIRONMENT.PORTFOLIO_URL || 'https://portfolio.metamask.io', METAMASK_DEBUG: devMode, METAMASK_ENVIRONMENT: environment, METAMASK_VERSION: version, diff --git a/shared/constants/metametrics.js b/shared/constants/metametrics.js index a994ec357..78990d81b 100644 --- a/shared/constants/metametrics.js +++ b/shared/constants/metametrics.js @@ -323,6 +323,7 @@ export const EVENT_NAMES = { PERMISSIONS_APPROVED: 'Permissions Approved', PERMISSIONS_REJECTED: 'Permissions Rejected', PERMISSIONS_REQUESTED: 'Permissions Requested', + PORTFOLIO_LINK_CLICKED: 'Portfolio Link Clicked', PUBLIC_ADDRESS_COPIED: 'Public Address Copied', PROVIDER_METHOD_CALLED: 'Provider Method Called', SIGNATURE_APPROVED: 'Signature Approved', diff --git a/test/e2e/fixtures/address-entry/state.json b/test/e2e/fixtures/address-entry/state.json index 03ed534bd..5fbf10276 100644 --- a/test/e2e/fixtures/address-entry/state.json +++ b/test/e2e/fixtures/address-entry/state.json @@ -15,7 +15,8 @@ }, "AppStateController": { "mkrMigrationReminderTimestamp": null, - "swapsWelcomeMessageHasBeenShown": true + "swapsWelcomeMessageHasBeenShown": true, + "showPortfolioTooltip": false }, "CachedBalancesController": { "cachedBalances": { diff --git a/test/e2e/fixtures/connected-state/state.json b/test/e2e/fixtures/connected-state/state.json index e29020a90..28a206071 100644 --- a/test/e2e/fixtures/connected-state/state.json +++ b/test/e2e/fixtures/connected-state/state.json @@ -1,7 +1,8 @@ { "data": { "AppStateController": { - "connectedStatusPopoverHasBeenShown": false + "connectedStatusPopoverHasBeenShown": false, + "showPortfolioTooltip": false }, "CachedBalancesController": { "cachedBalances": { diff --git a/test/e2e/fixtures/custom-rpc/state.json b/test/e2e/fixtures/custom-rpc/state.json index ecd4ea5dc..8088a1799 100644 --- a/test/e2e/fixtures/custom-rpc/state.json +++ b/test/e2e/fixtures/custom-rpc/state.json @@ -1,7 +1,8 @@ { "data": { "AppStateController": { - "mkrMigrationReminderTimestamp": null + "mkrMigrationReminderTimestamp": null, + "showPortfolioTooltip": false }, "CachedBalancesController": { "cachedBalances": { diff --git a/test/e2e/fixtures/custom-token/state.json b/test/e2e/fixtures/custom-token/state.json index ea408f952..5f447420b 100644 --- a/test/e2e/fixtures/custom-token/state.json +++ b/test/e2e/fixtures/custom-token/state.json @@ -12,7 +12,8 @@ "connectedStatusPopoverHasBeenShown": true, "defaultHomeActiveTabName": null, "recoveryPhraseReminderHasBeenShown": true, - "recoveryPhraseReminderLastShown": "__FIXTURE_SUBSTITUTION__currentDateInMilliseconds" + "recoveryPhraseReminderLastShown": "__FIXTURE_SUBSTITUTION__currentDateInMilliseconds", + "showPortfolioTooltip": false }, "CachedBalancesController": { "cachedBalances": { diff --git a/test/e2e/fixtures/eip-1559-v2-dapp/state.json b/test/e2e/fixtures/eip-1559-v2-dapp/state.json index 1a6149f20..1b01bc077 100644 --- a/test/e2e/fixtures/eip-1559-v2-dapp/state.json +++ b/test/e2e/fixtures/eip-1559-v2-dapp/state.json @@ -2,7 +2,8 @@ "data": { "AppStateController": { "mkrMigrationReminderTimestamp": null, - "swapsWelcomeMessageHasBeenShown": true + "swapsWelcomeMessageHasBeenShown": true, + "showPortfolioTooltip": false }, "CachedBalancesController": { "cachedBalances": { diff --git a/test/e2e/fixtures/eip-1559-v2/state.json b/test/e2e/fixtures/eip-1559-v2/state.json index e44ba2a37..0341d4ecb 100644 --- a/test/e2e/fixtures/eip-1559-v2/state.json +++ b/test/e2e/fixtures/eip-1559-v2/state.json @@ -2,7 +2,8 @@ "data": { "AppStateController": { "mkrMigrationReminderTimestamp": null, - "swapsWelcomeMessageHasBeenShown": true + "swapsWelcomeMessageHasBeenShown": true, + "showPortfolioTooltip": false }, "CachedBalancesController": { "cachedBalances": { diff --git a/test/e2e/fixtures/import-ui/state.json b/test/e2e/fixtures/import-ui/state.json index 80ab5894a..9de1f31ff 100644 --- a/test/e2e/fixtures/import-ui/state.json +++ b/test/e2e/fixtures/import-ui/state.json @@ -265,7 +265,8 @@ "AppStateController": { "connectedStatusPopoverHasBeenShown": true, "swapsWelcomeMessageHasBeenShown": false, - "defaultHomeActiveTabName": "Activity" + "defaultHomeActiveTabName": "Activity", + "showPortfolioTooltip": false } }, "meta": { diff --git a/test/e2e/fixtures/imported-account/state.json b/test/e2e/fixtures/imported-account/state.json index 2a5849f2e..d89d6e2cf 100644 --- a/test/e2e/fixtures/imported-account/state.json +++ b/test/e2e/fixtures/imported-account/state.json @@ -1,7 +1,8 @@ { "data": { "AppStateController": { - "mkrMigrationReminderTimestamp": null + "mkrMigrationReminderTimestamp": null, + "showPortfolioTooltip": false }, "CachedBalancesController": { "cachedBalances": { diff --git a/test/e2e/fixtures/localization/state.json b/test/e2e/fixtures/localization/state.json index 7b8d4ae27..d5ba38d28 100644 --- a/test/e2e/fixtures/localization/state.json +++ b/test/e2e/fixtures/localization/state.json @@ -1,7 +1,8 @@ { "data": { "AppStateController": { - "mkrMigrationReminderTimestamp": null + "mkrMigrationReminderTimestamp": null, + "showPortfolioTooltip": false }, "CachedBalancesController": { "cachedBalances": { diff --git a/test/e2e/fixtures/metrics-enabled/state.json b/test/e2e/fixtures/metrics-enabled/state.json index 7a4c864a5..683f6cda6 100644 --- a/test/e2e/fixtures/metrics-enabled/state.json +++ b/test/e2e/fixtures/metrics-enabled/state.json @@ -1,7 +1,8 @@ { "data": { "AppStateController": { - "connectedStatusPopoverHasBeenShown": false + "connectedStatusPopoverHasBeenShown": false, + "showPortfolioTooltip": false }, "CachedBalancesController": { "cachedBalances": { diff --git a/test/e2e/fixtures/navigate-transactions/state.json b/test/e2e/fixtures/navigate-transactions/state.json index a9faca5ba..8d4734d54 100644 --- a/test/e2e/fixtures/navigate-transactions/state.json +++ b/test/e2e/fixtures/navigate-transactions/state.json @@ -1,7 +1,8 @@ { "data": { "AppStateController": { - "mkrMigrationReminderTimestamp": null + "mkrMigrationReminderTimestamp": null, + "showPortfolioTooltip": false }, "CachedBalancesController": { "cachedBalances": { diff --git a/test/e2e/fixtures/send-edit-v2/state.json b/test/e2e/fixtures/send-edit-v2/state.json index 830976631..b414cf8d3 100644 --- a/test/e2e/fixtures/send-edit-v2/state.json +++ b/test/e2e/fixtures/send-edit-v2/state.json @@ -2,7 +2,8 @@ "data": { "AppStateController": { "mkrMigrationReminderTimestamp": null, - "swapsWelcomeMessageHasBeenShown": true + "swapsWelcomeMessageHasBeenShown": true, + "showPortfolioTooltip": false }, "CachedBalancesController": { "cachedBalances": { diff --git a/test/e2e/fixtures/send-edit/state.json b/test/e2e/fixtures/send-edit/state.json index 8c5a4658e..30eee4e90 100644 --- a/test/e2e/fixtures/send-edit/state.json +++ b/test/e2e/fixtures/send-edit/state.json @@ -2,7 +2,8 @@ "data": { "AppStateController": { "mkrMigrationReminderTimestamp": null, - "swapsWelcomeMessageHasBeenShown": true + "swapsWelcomeMessageHasBeenShown": true, + "showPortfolioTooltip": false }, "CachedBalancesController": { "cachedBalances": { diff --git a/test/e2e/fixtures/special-settings/state.json b/test/e2e/fixtures/special-settings/state.json index 2f0297cc2..57a4cd2c9 100644 --- a/test/e2e/fixtures/special-settings/state.json +++ b/test/e2e/fixtures/special-settings/state.json @@ -1,7 +1,8 @@ { "data": { "AppStateController": { - "mkrMigrationReminderTimestamp": null + "mkrMigrationReminderTimestamp": null, + "showPortfolioTooltip": false }, "CachedBalancesController": { "cachedBalances": { diff --git a/test/e2e/fixtures/threebox-enabled/state.json b/test/e2e/fixtures/threebox-enabled/state.json index a2e4229a4..e7b7d10a4 100644 --- a/test/e2e/fixtures/threebox-enabled/state.json +++ b/test/e2e/fixtures/threebox-enabled/state.json @@ -2,7 +2,8 @@ "data": { "AppStateController": { "swapsWelcomeMessageHasBeenShown": true, - "connectedStatusPopoverHasBeenShown": false + "connectedStatusPopoverHasBeenShown": false, + "showPortfolioTooltip": false }, "CachedBalancesController": { "cachedBalances": { diff --git a/ui/components/ui/icon/icon-chart.js b/ui/components/ui/icon/icon-chart.js new file mode 100644 index 000000000..87cb780cc --- /dev/null +++ b/ui/components/ui/icon/icon-chart.js @@ -0,0 +1,45 @@ +import React from 'react'; +import PropTypes from 'prop-types'; + +const IconChart = ({ + size = 12, + color = 'var(--color-primary-default)', + className, + ariaLabel, +}) => ( + + + +); + +IconChart.propTypes = { + /** + * The size of the Icon follows an 8px grid 2 = 16px, 3 = 24px etc + */ + size: PropTypes.number, + /** + * The color of the icon accepts design token css variables + */ + color: PropTypes.string, + /** + * An additional className to assign the Icon + */ + className: PropTypes.string, + /** + * The aria-label of the icon for accessibility purposes + */ + ariaLabel: PropTypes.string, +}; + +export default IconChart; diff --git a/ui/components/ui/tabs/tabs.component.js b/ui/components/ui/tabs/tabs.component.js index bce22ebf5..2357bfc35 100644 --- a/ui/components/ui/tabs/tabs.component.js +++ b/ui/components/ui/tabs/tabs.component.js @@ -7,6 +7,7 @@ export default class Tabs extends Component { defaultActiveTabName: null, onTabClick: null, tabsClassName: undefined, + subHeader: null, }; static propTypes = { @@ -14,6 +15,7 @@ export default class Tabs extends Component { onTabClick: PropTypes.func, children: PropTypes.node.isRequired, tabsClassName: PropTypes.string, + subHeader: PropTypes.node, }; state = { @@ -74,12 +76,13 @@ export default class Tabs extends Component { } render() { - const { tabsClassName } = this.props; + const { tabsClassName, subHeader } = this.props; return (
    {this.renderTabs()}
+ {subHeader}
{this.renderActiveTabContent()}
); diff --git a/ui/components/ui/tooltip/tooltip.js b/ui/components/ui/tooltip/tooltip.js index b05a0acf1..b819f6b9e 100644 --- a/ui/components/ui/tooltip/tooltip.js +++ b/ui/components/ui/tooltip/tooltip.js @@ -12,6 +12,7 @@ export default class Tooltip extends PureComponent { onHidden: null, position: 'left', offset: 0, + open: undefined, size: 'small', title: null, trigger: 'mouseenter focus', @@ -29,6 +30,7 @@ export default class Tooltip extends PureComponent { interactive: PropTypes.bool, offset: PropTypes.number, onHidden: PropTypes.func, + open: PropTypes.bool, position: PropTypes.oneOf(['top', 'right', 'bottom', 'left']), size: PropTypes.oneOf(['small', 'regular', 'big']), title: PropTypes.string, @@ -54,6 +56,7 @@ export default class Tooltip extends PureComponent { trigger, onHidden, offset, + open, wrapperClassName, style, theme, @@ -82,6 +85,7 @@ export default class Tooltip extends PureComponent { style={style} title={disabled ? '' : title} trigger={trigger} + open={open} theme={`tippy-tooltip--mm-custom ${theme}`} // Required for correct theming tabIndex={tabIndex || 0} tag={tag} diff --git a/ui/ducks/app/app.js b/ui/ducks/app/app.js index 94c3bb6f2..186af52f0 100644 --- a/ui/ducks/app/app.js +++ b/ui/ducks/app/app.js @@ -58,6 +58,7 @@ export default function reduceApp(state = {}, action) { ledgerTransportStatus: TRANSPORT_STATES.NONE, newNetworkAdded: '', newCollectibleAddedMessage: '', + portfolioTooltipWasShownInThisSession: false, sendInputCurrencySwitched: false, newTokensImported: '', newCustomNetworkAdded: {}, @@ -321,6 +322,12 @@ export default function reduceApp(state = {}, action) { newCollectibleAddedMessage: action.value, }; + case actionConstants.PORTFOLIO_TOOLTIP_WAS_SHOWN_IN_THIS_SESSION: + return { + ...appState, + portfolioTooltipWasShownInThisSession: true, + }; + case actionConstants.LOADING_METHOD_DATA_STARTED: return { ...appState, @@ -418,6 +425,12 @@ export function hideWhatsNewPopup() { }; } +export function setPortfolioTooltipWasShownInThisSession() { + return { + type: actionConstants.PORTFOLIO_TOOLTIP_WAS_SHOWN_IN_THIS_SESSION, + }; +} + export function toggleGasLoadingAnimation(value) { return { type: actionConstants.TOGGLE_GAS_LOADING_ANIMATION, value }; } @@ -447,6 +460,10 @@ export function getLedgerTransportStatus(state) { return state.appState.ledgerTransportStatus; } +export function getPortfolioTooltipWasShownInThisSession(state) { + return state.appState.portfolioTooltipWasShownInThisSession; +} + export function toggleCurrencySwitch() { return { type: actionConstants.TOGGLE_CURRENCY_INPUT_SWITCH }; } diff --git a/ui/pages/home/home.component.js b/ui/pages/home/home.component.js index 3b7a446c7..ccd454eed 100644 --- a/ui/pages/home/home.component.js +++ b/ui/pages/home/home.component.js @@ -3,12 +3,12 @@ import PropTypes from 'prop-types'; import { Redirect, Route } from 'react-router-dom'; ///: BEGIN:ONLY_INCLUDE_IN(main) import { SUPPORT_LINK } from '../../helpers/constants/common'; +///: END:ONLY_INCLUDE_IN import { EVENT, EVENT_NAMES, CONTEXT_PROPS, } from '../../../shared/constants/metametrics'; -///: END:ONLY_INCLUDE_IN import { formatDate } from '../../helpers/utils/util'; import AssetList from '../../components/app/asset-list'; import CollectiblesTab from '../../components/app/collectibles-tab'; @@ -27,6 +27,7 @@ import WhatsNewPopup from '../../components/app/whats-new-popup'; import RecoveryPhraseReminder from '../../components/app/recovery-phrase-reminder'; import ActionableMessage from '../../components/ui/actionable-message/actionable-message'; import Typography from '../../components/ui/typography/typography'; +import IconChart from '../../components/ui/icon/icon-chart'; import { TYPOGRAPHY, FONT_WEIGHT, @@ -50,6 +51,7 @@ import { ADD_COLLECTIBLE_ROUTE, } from '../../helpers/constants/routes'; import ZENDESK_URLS from '../../helpers/constants/zendesk-url'; +import Tooltip from '../../components/ui/tooltip'; ///: BEGIN:ONLY_INCLUDE_IN(beta) import BetaHomeFooter from './beta/beta-home-footer.component'; ///: END:ONLY_INCLUDE_IN @@ -115,6 +117,10 @@ export default class Home extends PureComponent { infuraBlocked: PropTypes.bool.isRequired, showWhatsNewPopup: PropTypes.bool.isRequired, hideWhatsNewPopup: PropTypes.func.isRequired, + showPortfolioTooltip: PropTypes.bool.isRequired, + hidePortfolioTooltip: PropTypes.func.isRequired, + portfolioTooltipWasShownInThisSession: PropTypes.bool.isRequired, + setPortfolioTooltipWasShownInThisSession: PropTypes.func.isRequired, announcementsToShow: PropTypes.bool.isRequired, ///: BEGIN:ONLY_INCLUDE_IN(flask) errorsToShow: PropTypes.object.isRequired, @@ -213,7 +219,12 @@ export default class Home extends PureComponent { } componentDidMount() { + const { setPortfolioTooltipWasShownInThisSession, showPortfolioTooltip } = + this.props; this.checkStatusAndNavigate(); + if (showPortfolioTooltip) { + setPortfolioTooltipWasShownInThisSession(); + } } static getDerivedStateFromProps(props) { @@ -594,6 +605,9 @@ export default class Home extends PureComponent { announcementsToShow, showWhatsNewPopup, hideWhatsNewPopup, + showPortfolioTooltip, + hidePortfolioTooltip, + portfolioTooltipWasShownInThisSession, seedPhraseBackedUp, showRecoveryPhraseReminder, firstTimeFlowType, @@ -610,8 +624,9 @@ export default class Home extends PureComponent { ((completedOnboarding && firstTimeFlowType === 'import') || !completedOnboarding) && announcementsToShow && - showWhatsNewPopup; - + showWhatsNewPopup && + !showPortfolioTooltip && + !portfolioTooltipWasShownInThisSession; return (
@@ -640,6 +655,67 @@ export default class Home extends PureComponent { defaultActiveTabName={defaultHomeActiveTabName} onTabClick={onTabClick} tabsClassName="home__tabs" + subHeader={ + +
+
+ {t('new')} +
+ +
+
+ {t('tryOur')}  + + {t('betaPortfolioSite')} + +  {t('keepTapsOnTokens')} +
+
+ } + > +
{ + const portfolioUrl = process.env.PORTFOLIO_URL; + global.platform.openTab({ + url: `${portfolioUrl}?metamaskEntry=ext`, + }); + this.context.trackEvent( + { + category: EVENT.CATEGORIES.HOME, + event: EVENT_NAMES.PORTFOLIO_LINK_CLICKED, + properties: { + url: portfolioUrl, + }, + }, + { + contextPropsIntoEventProperties: [ + CONTEXT_PROPS.PAGE_TITLE, + ], + }, + ); + }} + > + +
+ {t('portfolioSite')} +
+
+ + } > { shouldShowErrors: Object.entries(metamask.snapErrors || []).length > 0, ///: END:ONLY_INCLUDE_IN showWhatsNewPopup: getShowWhatsNewPopup(state), + showPortfolioTooltip: getShowPortfolioTooltip(state), + portfolioTooltipWasShownInThisSession: + getPortfolioTooltipWasShownInThisSession(state), showRecoveryPhraseReminder: getShowRecoveryPhraseReminder(state), seedPhraseBackedUp, newNetworkAdded: getNewNetworkAdded(state), @@ -185,6 +192,7 @@ const mapDispatchToProps = (dispatch) => ({ disableWeb3ShimUsageAlert: () => setAlertEnabledness(ALERT_TYPES.web3ShimUsage, false), hideWhatsNewPopup: () => dispatch(hideWhatsNewPopup()), + hidePortfolioTooltip, setRecoveryPhraseReminderHasBeenShown: () => dispatch(setRecoveryPhraseReminderHasBeenShown()), setRecoveryPhraseReminderLastShown: (lastShown) => @@ -204,6 +212,8 @@ const mapDispatchToProps = (dispatch) => ({ setRpcTarget: (rpcUrl, chainId, ticker, nickname) => { dispatch(setRpcTarget(rpcUrl, chainId, ticker, nickname)); }, + setPortfolioTooltipWasShownInThisSession: () => + dispatch(setPortfolioTooltipWasShownInThisSession()), }); export default compose( diff --git a/ui/pages/home/index.scss b/ui/pages/home/index.scss index b4accb829..cee94a943 100644 --- a/ui/pages/home/index.scss +++ b/ui/pages/home/index.scss @@ -221,4 +221,56 @@ margin-bottom: 16px; } } + + &__subheader-link { + display: flex; + padding: 12px 0; + justify-content: center; + color: var(--color-primary-default); + align-items: center; + cursor: pointer; + + &--tooltip-content { + &-header { + display: flex; + justify-content: space-between; + margin-bottom: 8px; + + &-text { + font-size: 18px; + line-height: 22.82px; + font-weight: 700; + } + + &-button { + background-color: var(--color-primary-default); + color: var(--color-primary-inverse); + border: 0; + } + } + + &-text-bold { + font-weight: 700; + } + } + + &--tooltip-theme { + background-color: var(--color-primary-default) !important; + + & .tippy-tooltip-content { + color: var(--color-primary-inverse) !important; + } + + & .arrow-regular { + border-bottom-color: var(--color-primary-default) !important; + } + } + + &--text { + margin-left: 8px; + font-weight: 400; + font-size: 12px; + line-height: 140.62%; + } + } } diff --git a/ui/selectors/selectors.js b/ui/selectors/selectors.js index 4a63ca187..471d30886 100644 --- a/ui/selectors/selectors.js +++ b/ui/selectors/selectors.js @@ -881,6 +881,10 @@ export function getShowRecoveryPhraseReminder(state) { return currentTime - recoveryPhraseReminderLastShown >= frequency; } +export function getShowPortfolioTooltip(state) { + return state.metamask.showPortfolioTooltip; +} + /** * To get the useTokenDetection flag which determines whether a static or dynamic token list is used * diff --git a/ui/store/actionConstants.js b/ui/store/actionConstants.js index c9e673afa..2ec9e212c 100644 --- a/ui/store/actionConstants.js +++ b/ui/store/actionConstants.js @@ -106,7 +106,8 @@ export const SET_OPEN_METAMASK_TAB_IDS = 'SET_OPEN_METAMASK_TAB_IDS'; // Home Screen export const HIDE_WHATS_NEW_POPUP = 'HIDE_WHATS_NEW_POPUP'; - +export const PORTFOLIO_TOOLTIP_WAS_SHOWN_IN_THIS_SESSION = + 'PORTFOLIO_TOOLTIP_WAS_SHOWN_IN_THIS_SESSION'; export const TOGGLE_GAS_LOADING_ANIMATION = 'TOGGLE_GAS_LOADING_ANIMATION'; // Smart Transactions diff --git a/ui/store/actions.js b/ui/store/actions.js index a05abf725..9244a7a8a 100644 --- a/ui/store/actions.js +++ b/ui/store/actions.js @@ -3858,6 +3858,10 @@ export function hideTestNetMessage() { return submitRequestToBackground('setShowTestnetMessageInDropdown', [false]); } +export function hidePortfolioTooltip() { + return submitRequestToBackground('setShowPortfolioTooltip', [false]); +} + export function setCollectiblesDetectionNoticeDismissed() { return submitRequestToBackground('setCollectiblesDetectionNoticeDismissed', [ true, From db158c242c6058d19b08f5adf966e95f7c07bc2d Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Fri, 16 Sep 2022 09:13:59 -0400 Subject: [PATCH 22/34] Fix portfolio URL configuration (#15849) The portfolio URL added in #15407 was meant to be configurable via environment variable or the `.metamaskrc` file, but that configuration was broken. Instead the default value was always used. That configuration has been fixed. The portfolio URL can be set either by environment variable or configuration file. --- development/build/config.js | 1 + development/build/scripts.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/development/build/config.js b/development/build/config.js index a907b64f5..386bb7554 100644 --- a/development/build/config.js +++ b/development/build/config.js @@ -25,6 +25,7 @@ async function getConfig() { INFURA_PROJECT_ID: process.env.INFURA_PROJECT_ID, ONBOARDING_V2: process.env.ONBOARDING_V2, PHISHING_WARNING_PAGE_URL: process.env.PHISHING_WARNING_PAGE_URL, + PORTFOLIO_URL: process.env.PORTFOLIO_URL, PUBNUB_PUB_KEY: process.env.PUBNUB_PUB_KEY, PUBNUB_SUB_KEY: process.env.PUBNUB_SUB_KEY, SEGMENT_HOST: process.env.SEGMENT_HOST, diff --git a/development/build/scripts.js b/development/build/scripts.js index eca8bee2c..5b89b372a 100644 --- a/development/build/scripts.js +++ b/development/build/scripts.js @@ -1023,7 +1023,6 @@ async function getEnvironmentVariables({ buildTarget, buildType, version }) { environment, testing, }), - PORTFOLIO_URL: ENVIRONMENT.PORTFOLIO_URL || 'https://portfolio.metamask.io', METAMASK_DEBUG: devMode, METAMASK_ENVIRONMENT: environment, METAMASK_VERSION: version, @@ -1031,6 +1030,7 @@ async function getEnvironmentVariables({ buildTarget, buildType, version }) { NODE_ENV: devMode ? ENVIRONMENT.DEVELOPMENT : ENVIRONMENT.PRODUCTION, ONBOARDING_V2: config.ONBOARDING_V2 === '1', PHISHING_WARNING_PAGE_URL: getPhishingWarningPageUrl({ config, testing }), + PORTFOLIO_URL: config.PORTFOLIO_URL || 'https://portfolio.metamask.io', PUBNUB_PUB_KEY: config.PUBNUB_PUB_KEY || '', PUBNUB_SUB_KEY: config.PUBNUB_SUB_KEY || '', SEGMENT_HOST: config.SEGMENT_HOST, From 060fc9453c207933aa147cd50bc3e6b3ff4a80fe Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Fri, 16 Sep 2022 18:11:31 -0230 Subject: [PATCH 23/34] Correct when setApprovalForAll message is shown (#15863) --- .../confirm-page-container/confirm-page-container.component.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/components/app/confirm-page-container/confirm-page-container.component.js b/ui/components/app/confirm-page-container/confirm-page-container.component.js index 1da48f396..8141a6470 100644 --- a/ui/components/app/confirm-page-container/confirm-page-container.component.js +++ b/ui/components/app/confirm-page-container/confirm-page-container.component.js @@ -308,7 +308,7 @@ export default class ConfirmPageContainer extends Component { )} - {isSetApproveForAll && !setApproveForAllArg && ( + {isSetApproveForAll && setApproveForAllArg && ( {t('confirmPageDialogSetApprovalForAll')} From b88b39f485d8946e4985bd4437bc3955edd350d5 Mon Sep 17 00:00:00 2001 From: seaona <54408225+seaona@users.noreply.github.com> Date: Mon, 19 Sep 2022 16:53:11 +0200 Subject: [PATCH 24/34] 10.19.0 Changelog (#15755) * 10.19.0 Changelog - first draft * Remove non-changelog PRs * Cleanup by removing uncategorized commits that should not go to the Changelog * Re-write commit descriptions * Re-phrasing more descriptions * Add missing spaces and fix URLs for gridplus * Flask description updated for snap_getBip44Entropy Co-authored-by: Frederik Bolding * Flask description updated for snap_getBip32Entropy Co-authored-by: Frederik Bolding * Flask description updated for Dapp triggered Snap updates Co-authored-by: Frederik Bolding * Flask description updated for fix permissions Co-authored-by: Frederik Bolding * Move to the proper categories Flask PRs * Remove Snap package update as has no user-facing changes * Fix Changelog * Add space after Unreleased * Add Swaps fix for redirect to Activity tab * Last PR entries added Co-authored-by: Frederik Bolding --- CHANGELOG.md | 292 ++++++++++++--------------------------------------- 1 file changed, 66 insertions(+), 226 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff6006dba..30e7dbb98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,233 +5,73 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] + ## [10.19.0] -### Uncategorized -- Replaced use of pubnub for uuid method in app/ directory ([#15712](https://github.com/MetaMask/metamask-extension/pull/15712)) -- Updated Avalanche rpcUrl endpoint ([#15720](https://github.com/MetaMask/metamask-extension/pull/15720)) -- Updated the main copy on SetApprovalForAll confirmation screen ([#15724](https://github.com/MetaMask/metamask-extension/pull/15724)) -- Set view full transaction details by default ([#15726](https://github.com/MetaMask/metamask-extension/pull/15726)) -- Make updateTransactionSendFlowHistory background method idempotent ([#15585](https://github.com/MetaMask/metamask-extension/pull/15585)) -- Make addUnapprovedTransaction action idempotent ([#15667](https://github.com/MetaMask/metamask-extension/pull/15667)) -- improvement it translation ([#15477](https://github.com/MetaMask/metamask-extension/pull/15477)) -- MV3: add retry logic to actions ([#15337](https://github.com/MetaMask/metamask-extension/pull/15337)) -- Unit tests for first time flow/new account and onboarding flow. ([#15625](https://github.com/MetaMask/metamask-extension/pull/15625)) -- Set lavamoat codeowners to allow supply chain reviews ([#15624](https://github.com/MetaMask/metamask-extension/pull/15624)) -- [FLASK] `snaps-skunkworks@0.20.0` ([#15706](https://github.com/MetaMask/metamask-extension/pull/15706)) -- Sentry e2e test ([#15715](https://github.com/MetaMask/metamask-extension/pull/15715)) -- Created a new token component ([#15617](https://github.com/MetaMask/metamask-extension/pull/15617)) -- [GridPlus] Version bump ([#15711](https://github.com/MetaMask/metamask-extension/pull/15711)) -- Sync v10.18.4 with `develop` ([#15710](https://github.com/MetaMask/metamask-extension/pull/15710)) -- add e2e test for default icons ([#13869](https://github.com/MetaMask/metamask-extension/pull/13869)) -- Merge remote-tracking branch 'origin/develop' into master-sync -- Update `object.values` patch ([#15692](https://github.com/MetaMask/metamask-extension/pull/15692)) -- chore: Adjust trailing whitespace ([#15636](https://github.com/MetaMask/metamask-extension/pull/15636)) -- updated casing in import Token for spanish ([#15687](https://github.com/MetaMask/metamask-extension/pull/15687)) -- development scripts: add node shebang; mark as executable ([#15655](https://github.com/MetaMask/metamask-extension/pull/15655)) -- Created a new contract details modal ([#15549](https://github.com/MetaMask/metamask-extension/pull/15549)) -- Token allowance improvements feature flag ([#15646](https://github.com/MetaMask/metamask-extension/pull/15646)) -- Updated origin pill component to match the new design ([#15603](https://github.com/MetaMask/metamask-extension/pull/15603)) -- Update `depcheck` to latest version ([#15690](https://github.com/MetaMask/metamask-extension/pull/15690)) -- Replace `lavamoat-runtime.js` patch ([#15682](https://github.com/MetaMask/metamask-extension/pull/15682)) -- upgrade jest ([#15642](https://github.com/MetaMask/metamask-extension/pull/15642)) -- Fix Sentry deduplication of events that were never sent ([#15677](https://github.com/MetaMask/metamask-extension/pull/15677)) -- Jest configuration fix ([#15673](https://github.com/MetaMask/metamask-extension/pull/15673)) -- Header component for transaction confirmation screens ([#15614](https://github.com/MetaMask/metamask-extension/pull/15614)) -- New network info popup ([#13319](https://github.com/MetaMask/metamask-extension/pull/13319)) -- Consolidating Zendesk URLs in to constants file ([#15669](https://github.com/MetaMask/metamask-extension/pull/15669)) -- Created review spending cap component ([#15633](https://github.com/MetaMask/metamask-extension/pull/15633)) -- Fix Sentry in LavaMoat contexts ([#15672](https://github.com/MetaMask/metamask-extension/pull/15672)) -- Fix LavaMoat policy generation script ([#15668](https://github.com/MetaMask/metamask-extension/pull/15668)) -- Using formatIconUrlWithProxy to get the iconUrl proxy of swap token ([#15562](https://github.com/MetaMask/metamask-extension/pull/15562)) -- Migrate app constants to typescript ([#15611](https://github.com/MetaMask/metamask-extension/pull/15611)) -- Updating Customize Nonce 'Learn More' link ([#15658](https://github.com/MetaMask/metamask-extension/pull/15658)) -- Ensuring Blockies icon is used in recipient details when enabled ([#15662](https://github.com/MetaMask/metamask-extension/pull/15662)) -- Fixing Contacts breadcrumb when viewing contact details ([#15663](https://github.com/MetaMask/metamask-extension/pull/15663)) -- Fixing Blockies identicon option alignment ([#15652](https://github.com/MetaMask/metamask-extension/pull/15652)) -- Remove unnecessary event props, update STX controller version ([#15653](https://github.com/MetaMask/metamask-extension/pull/15653)) -- Fixing token detection grammar ([#15644](https://github.com/MetaMask/metamask-extension/pull/15644)) -- Add validation to production build script ([#15468](https://github.com/MetaMask/metamask-extension/pull/15468)) -- Fix stray space/period in Custom Token warning text ([#15650](https://github.com/MetaMask/metamask-extension/pull/15650)) -- chore: Complete node16 upgrade ([#15634](https://github.com/MetaMask/metamask-extension/pull/15634)) -- Adding unit test case to for idempotent behaviour of importAccountWithStrategy idempotent ([#15583](https://github.com/MetaMask/metamask-extension/pull/15583)) -- Add unit test coverage to ensure that addToken method is idempotent. ([#15587](https://github.com/MetaMask/metamask-extension/pull/15587)) -- Convert LavaMoat policy generation script to Yargs application ([#15626](https://github.com/MetaMask/metamask-extension/pull/15626)) -- Bump @metamask/providers from 9.0.0 to 9.1.0 ([#15514](https://github.com/MetaMask/metamask-extension/pull/15514)) -- Fix onboarding events ([#15608](https://github.com/MetaMask/metamask-extension/pull/15608)) -- Add test case to ensure that action addCustomNetwork is idempotent ([#15602](https://github.com/MetaMask/metamask-extension/pull/15602)) -- added avatar network component ([#15502](https://github.com/MetaMask/metamask-extension/pull/15502)) -- filter breadcrumbs for improved clarity while debugging sentry errors ([#15639](https://github.com/MetaMask/metamask-extension/pull/15639)) -- Fix state creation in setupSentryGetStateGlobal ([#15635](https://github.com/MetaMask/metamask-extension/pull/15635)) -- UI-14395: typography v2 ([#15408](https://github.com/MetaMask/metamask-extension/pull/15408)) -- added avatar token component ([#15466](https://github.com/MetaMask/metamask-extension/pull/15466)) -- Fix Signature Request styles ([#15621](https://github.com/MetaMask/metamask-extension/pull/15621)) -- [FLASK] `snaps-skunkworks@0.19.0` ([#15619](https://github.com/MetaMask/metamask-extension/pull/15619)) -- Adding `BaseIcon` UI component ([#15609](https://github.com/MetaMask/metamask-extension/pull/15609)) -- New metrics data for token approval transactions ([#15289](https://github.com/MetaMask/metamask-extension/pull/15289)) -- Send to Contract ganache refactor ([#15605](https://github.com/MetaMask/metamask-extension/pull/15605)) -- Fix for randomly resets of updated values in network edit form ([#14370](https://github.com/MetaMask/metamask-extension/pull/14370)) -- the token detction change affected swap performace, this is fixing it ([#15607](https://github.com/MetaMask/metamask-extension/pull/15607)) -- Redirect a user to the Activity tab after they click on "View in Activity" ([#15620](https://github.com/MetaMask/metamask-extension/pull/15620)) -- Refactor failing contract with ganache seeder ([#15601](https://github.com/MetaMask/metamask-extension/pull/15601)) -- Updating Box to remove color prop default (Fixes develop) ([#15613](https://github.com/MetaMask/metamask-extension/pull/15613)) -- Update readme with some more docs and visuals of codebase ([#15577](https://github.com/MetaMask/metamask-extension/pull/15577)) -- Rename some events ([#15543](https://github.com/MetaMask/metamask-extension/pull/15543)) -- [e2e] Refactor contract-interactions spec using Ganache seeder ([#15553](https://github.com/MetaMask/metamask-extension/pull/15553)) -- Unit tests improvements ([#15517](https://github.com/MetaMask/metamask-extension/pull/15517)) -- Refactoring isManifestV3 variable ([#15568](https://github.com/MetaMask/metamask-extension/pull/15568)) -- Add initial Typescript Files ([#15596](https://github.com/MetaMask/metamask-extension/pull/15596)) -- Cleanup after TOKEN_DETECTION_V2 flag removal ([#15564](https://github.com/MetaMask/metamask-extension/pull/15564)) -- Fix rpc and tests ([#15570](https://github.com/MetaMask/metamask-extension/pull/15570)) -- Make add new account idempotent operation ([#15566](https://github.com/MetaMask/metamask-extension/pull/15566)) -- Call metrics event for wallet type selection at the right time ([#15591](https://github.com/MetaMask/metamask-extension/pull/15591)) -- Prevent type error in catch block in account-tracker.js _updateAccount ([#15589](https://github.com/MetaMask/metamask-extension/pull/15589)) -- RFC: sort keys rule and initial changes ([#15534](https://github.com/MetaMask/metamask-extension/pull/15534)) -- Fix #14846 - Inject provider for MV3 via app-init ([#15448](https://github.com/MetaMask/metamask-extension/pull/15448)) -- [GridPlus] Bumps `gridplus-sdk` to v2.2.4 ([#15561](https://github.com/MetaMask/metamask-extension/pull/15561)) -- Updating useMemo dependency list ([#15572](https://github.com/MetaMask/metamask-extension/pull/15572)) -- Adding initial and transparent to Box component ([#15565](https://github.com/MetaMask/metamask-extension/pull/15565)) -- Capture user actions times for MV2 benchmark and generate artifacts ([#15353](https://github.com/MetaMask/metamask-extension/pull/15353)) -- added color prop to Box component ([#15507](https://github.com/MetaMask/metamask-extension/pull/15507)) -- Add more tracking for MetaMask ([#15462](https://github.com/MetaMask/metamask-extension/pull/15462)) -- [e2e] Enabling/Disabling token conversion on testnets ([#14649](https://github.com/MetaMask/metamask-extension/pull/14649)) -- Adding polymorphic 'as' prop to Box component and updating Typography component to use the same ([#15518](https://github.com/MetaMask/metamask-extension/pull/15518)) -- Using Object.values for shuffle token list for swaps ([#15530](https://github.com/MetaMask/metamask-extension/pull/15530)) -- Fix deployment of TS migration dashboard (again) ([#15528](https://github.com/MetaMask/metamask-extension/pull/15528)) -- Fix text alignment in Add a Network popup view ([#15520](https://github.com/MetaMask/metamask-extension/pull/15520)) -- Fix deploying the TS migration dashboard ([#15516](https://github.com/MetaMask/metamask-extension/pull/15516)) -- Convert knobs and actions to controls/args ConfirmEncryptionPublicKey story ([#14319](https://github.com/MetaMask/metamask-extension/pull/14319)) -- ConfirmPage: update UI for setApproveForAll transactions to better warn users of the allowances ([#15512](https://github.com/MetaMask/metamask-extension/pull/15512)) -- Token detection V2 Flag Removal and Re-introducing the use of legacy token list when token detection is OFF ([#15138](https://github.com/MetaMask/metamask-extension/pull/15138)) -- docs: addition of controls and readme in SelectQuotePopover story ([#15187](https://github.com/MetaMask/metamask-extension/pull/15187)) -- Add TypeScript migration dashboard ([#13820](https://github.com/MetaMask/metamask-extension/pull/13820)) -- Fixing design system icon alternative color const ([#15513](https://github.com/MetaMask/metamask-extension/pull/15513)) -- deps - patch ethereumjs-util/dist/secp256k1 for fast module init via lazy loading ([#14682](https://github.com/MetaMask/metamask-extension/pull/14682)) -- 3box Replacement ([#15243](https://github.com/MetaMask/metamask-extension/pull/15243)) -- Only check if a user has enough token balance before calling STX ([#15218](https://github.com/MetaMask/metamask-extension/pull/15218)) -- Fix connected site styling ([#15409](https://github.com/MetaMask/metamask-extension/pull/15409)) -- Adding option to update lavamoat policies in parallel ([#14536](https://github.com/MetaMask/metamask-extension/pull/14536)) -- Various test files converting to @testing-library/react. ([#15504](https://github.com/MetaMask/metamask-extension/pull/15504)) -- [E2E]: Set approval for all e2e ([#15481](https://github.com/MetaMask/metamask-extension/pull/15481)) -- Update createMethodMiddleware.js ([#15505](https://github.com/MetaMask/metamask-extension/pull/15505)) -- Various test files converting to @testing-library/react. ([#15470](https://github.com/MetaMask/metamask-extension/pull/15470)) -- Updating content to sentence case and updating tests ([#15285](https://github.com/MetaMask/metamask-extension/pull/15285)) -- Fix build script errors ([#15493](https://github.com/MetaMask/metamask-extension/pull/15493)) -- Add comments about legacy streams ([#15492](https://github.com/MetaMask/metamask-extension/pull/15492)) -- Replace `rc` with `ini` ([#15464](https://github.com/MetaMask/metamask-extension/pull/15464)) -- Update Babel and dependencies ([#15392](https://github.com/MetaMask/metamask-extension/pull/15392)) -- Sync `master` with `develop` ([#15476](https://github.com/MetaMask/metamask-extension/pull/15476)) -- Fixing changelog -- Fix -- Merge remote-tracking branch 'origin/develop' into master-sync -- Refactor build script to include build target ([#15447](https://github.com/MetaMask/metamask-extension/pull/15447)) -- Updating Zendesk ticket request URLs ([#15458](https://github.com/MetaMask/metamask-extension/pull/15458)) -- Update media query instances ([#15068](https://github.com/MetaMask/metamask-extension/pull/15068)) -- Convert unit test render from enzyme to @testing-library/react. ([#15091](https://github.com/MetaMask/metamask-extension/pull/15091)) -- add safegaurd for missing account in action ([#15450](https://github.com/MetaMask/metamask-extension/pull/15450)) -- [FLASK] Add update snap UI ([#15143](https://github.com/MetaMask/metamask-extension/pull/15143)) -- Fix "app-init" injection ([#15320](https://github.com/MetaMask/metamask-extension/pull/15320)) -- Add Sign-In with Ethereum ([#14438](https://github.com/MetaMask/metamask-extension/pull/14438)) -- Moving incorrectly ordered page component to correct pages category ([#15426](https://github.com/MetaMask/metamask-extension/pull/15426)) -- remove unnecessary usage of renderableGasButton logic ([#15422](https://github.com/MetaMask/metamask-extension/pull/15422)) -- Add QA migration guide ([#14544](https://github.com/MetaMask/metamask-extension/pull/14544)) -- Add data about dropped transaction in FINALIZED metrics event ([#15383](https://github.com/MetaMask/metamask-extension/pull/15383)) -- [FLASK] Fix key management permission copy ([#14849](https://github.com/MetaMask/metamask-extension/pull/14849)) -- MV3: Re-activate service worker and reconnect UI streams ([#14781](https://github.com/MetaMask/metamask-extension/pull/14781)) -- Adding shadow docs to storybook ([#15388](https://github.com/MetaMask/metamask-extension/pull/15388)) -- added AvatarBase Component ([#15307](https://github.com/MetaMask/metamask-extension/pull/15307)) -- update prettier ([#15360](https://github.com/MetaMask/metamask-extension/pull/15360)) -- Bundle optimazation 0 ([#14782](https://github.com/MetaMask/metamask-extension/pull/14782)) -- Adding readme for component-library folder ([#15381](https://github.com/MetaMask/metamask-extension/pull/15381)) -- fix: patch borc to avoid v8 bailing out of caching bytecode for the entire bundle chunk ([#15385](https://github.com/MetaMask/metamask-extension/pull/15385)) -- fix storybook ([#15387](https://github.com/MetaMask/metamask-extension/pull/15387)) -- cast chainId to hex for metrics ([#15332](https://github.com/MetaMask/metamask-extension/pull/15332)) -- New Crowdin translations by Github Action ([#14975](https://github.com/MetaMask/metamask-extension/pull/14975)) -- Performance improvements for Swaps ([#15359](https://github.com/MetaMask/metamask-extension/pull/15359)) -- Added speed up metrics data for transaction events and properly track speed up type ([#15197](https://github.com/MetaMask/metamask-extension/pull/15197)) -- Clean up of code introduced with 43f7a44 ([#15158](https://github.com/MetaMask/metamask-extension/pull/15158)) -- Adjusting the height of account menu nav items to expand scroll area ([#15302](https://github.com/MetaMask/metamask-extension/pull/15302)) -- Remove unnecessary file extensions ([#15352](https://github.com/MetaMask/metamask-extension/pull/15352)) -- [FLASK] disable "Mark all as read button" when there are no notifications ([#15333](https://github.com/MetaMask/metamask-extension/pull/15333)) -- Updates to stories and component ([#15357](https://github.com/MetaMask/metamask-extension/pull/15357)) -- Add comments to build script ([#15319](https://github.com/MetaMask/metamask-extension/pull/15319)) -- added tx details popup to cancelled Swap ([#15273](https://github.com/MetaMask/metamask-extension/pull/15273)) -- [FLASK] Fix missing snap hook ([#15354](https://github.com/MetaMask/metamask-extension/pull/15354)) -- remove exclusions for mismatched object jsdoc type casing ([#15351](https://github.com/MetaMask/metamask-extension/pull/15351)) -- Sync `master` with `develop` ([#15355](https://github.com/MetaMask/metamask-extension/pull/15355)) -- Fix for script to measure bundle size over time ([#15338](https://github.com/MetaMask/metamask-extension/pull/15338)) -- remove audit exclusion ([#15346](https://github.com/MetaMask/metamask-extension/pull/15346)) -- Updated all instances of "Component API" to "Props" in storybook documentation ([#15324](https://github.com/MetaMask/metamask-extension/pull/15324)) -- Update Eslint and deps ([#15293](https://github.com/MetaMask/metamask-extension/pull/15293)) -- fix filetype audit ([#15334](https://github.com/MetaMask/metamask-extension/pull/15334)) -- reducing logic gates in tx metrics ([#15329](https://github.com/MetaMask/metamask-extension/pull/15329)) -- [FLASK] Fix snaps authorship pill ([#15190](https://github.com/MetaMask/metamask-extension/pull/15190)) -- Fix build ([#15328](https://github.com/MetaMask/metamask-extension/pull/15328)) -- Master sync following v10.18.0 ([#15326](https://github.com/MetaMask/metamask-extension/pull/15326)) -- added storybook controls for confirm send ether component ([#15235](https://github.com/MetaMask/metamask-extension/pull/15235)) -- Modify transaction type and add contract method data to metrics ([#15175](https://github.com/MetaMask/metamask-extension/pull/15175)) -- Merge remote-tracking branch 'origin/develop' into master-sync -- Fix environment variable injection ([#15318](https://github.com/MetaMask/metamask-extension/pull/15318)) +### Added +- Add ENS wildcard and secure offchain resolution (ENSIP-10 & EIP3668) ([#14675](https://github.com/MetaMask/metamask-extension/pull/14675)) +- Add "What's New" notification about the Merge ([#15846](https://github.com/MetaMask/metamask-extension/pull/15846)) +- Add "What's New" notification about 3box deprecation ([#15763](https://github.com/MetaMask/metamask-extension/pull/15763)) +- Add "What's New" notification for Add Popular Networks feature ([#15121](https://github.com/MetaMask/metamask-extension/pull/15121)) +- Add "What's New" notification for Token Detection feature ([#15807](https://github.com/MetaMask/metamask-extension/pull/15807)) +- Add Warning for Rinkeby, Ropsten and Kovan test networks deprecation ([#15725](https://github.com/MetaMask/metamask-extension/pull/15725)) +- Add Network Info popup when changing selected Network ([#13319](https://github.com/MetaMask/metamask-extension/pull/13319)) +- Add Goerli, BSC, Optimism, Polygon, Avalance, Fantom and Arbitrum networks to query balances using BalanceChecker ([#13846] +- Add Token detection V2 ([#15138](https://github.com/MetaMask/metamask-extension/pull/15138)) +- Add Backup and Restore State functionalities for 3box replacement ([#15243](https://github.com/MetaMask/metamask-extension/pull/15243))(https://github.com/MetaMask/metamask-extension/pull/13846)) +- Add a Warning on the Confirmation screen, when user is performing a SetApprovalForAll transaction ([#15512](https://github.com/MetaMask/metamask-extension/pull/15512)) +- Add new translations for DE, EL, ES, FR, HI, ID, JA, KO, PT, RU, TL TR, VI and ZH ([#14975](https://github.com/MetaMask/metamask-extension/pull/14975)) +- Add Italian translation for "Forgot password" message ([#15477](https://github.com/MetaMask/metamask-extension/pull/15477)) +- Add link to Metalabs dapp into MetaMask home page ([#15407](https://github.com/MetaMask/metamask-extension/pull/15407)) +- Add Sepolia as a default test network ([#15787](https://github.com/MetaMask/metamask-extension/pull/15787)) +- Swaps: on the STX status page ([#14995](https://github.com/MetaMask/metamask-extension/pull/14995)) + - Add a link to the Swap tx + - Add a link for "Create a new swap" +- Swaps: add a tx details view for cancelled Swaps on the Activity tab ([#15273](https://github.com/MetaMask/metamask-extension/pull/15273)) - [FLASK] Add snap update metrics ([#15206](https://github.com/MetaMask/metamask-extension/pull/15206)) -- Fix for mv3 performance stats ([#15321](https://github.com/MetaMask/metamask-extension/pull/15321)) -- Converted BuildQuote story to use controls and action argType ([#15234](https://github.com/MetaMask/metamask-extension/pull/15234)) -- Rename various build script functions ([#15317](https://github.com/MetaMask/metamask-extension/pull/15317)) -- Remove unused bundling options in build script ([#15316](https://github.com/MetaMask/metamask-extension/pull/15316)) -- Updating design tokens package and shadow values with new tokens ([#15264](https://github.com/MetaMask/metamask-extension/pull/15264)) -- Bundlesize stats over time ([#15209](https://github.com/MetaMask/metamask-extension/pull/15209)) -- added storybook controls for confirm deploy contract component ([#15236](https://github.com/MetaMask/metamask-extension/pull/15236)) -- Fix: Actionable Message on Confirm Transaction view is over Tabs ([#15272](https://github.com/MetaMask/metamask-extension/pull/15272)) -- fix blockExplorer link on setApprovalForAll confirmation screen ([#15312](https://github.com/MetaMask/metamask-extension/pull/15312)) -- MV3 bundle size stats ([#15191](https://github.com/MetaMask/metamask-extension/pull/15191)) -- [e2e] Deploy contracts directly seeding Ganache ([#14631](https://github.com/MetaMask/metamask-extension/pull/14631)) -- remove redundant code ([#15306](https://github.com/MetaMask/metamask-extension/pull/15306)) -- Fix stringified object on NFT approve screen ([#15287](https://github.com/MetaMask/metamask-extension/pull/15287)) -- Add responsive props to Box component ([#15106](https://github.com/MetaMask/metamask-extension/pull/15106)) -- DefinitionList story: convert knobs and actions to controls / args ([#15185](https://github.com/MetaMask/metamask-extension/pull/15185)) -- show asset name instead of symbol for setApprovalForAll calls on NFT contracts where possible ([#15296](https://github.com/MetaMask/metamask-extension/pull/15296)) -- mock contract interaction signature in e2e tests ([#15297](https://github.com/MetaMask/metamask-extension/pull/15297)) -- Adding artifacts ([#15145](https://github.com/MetaMask/metamask-extension/pull/15145)) -- Fix Provider Tracking Metrics ([#15082](https://github.com/MetaMask/metamask-extension/pull/15082)) -- Capturing load time stats ([#15157](https://github.com/MetaMask/metamask-extension/pull/15157)) -- Capturing lavamoat stats in E2E ([#15153](https://github.com/MetaMask/metamask-extension/pull/15153)) -- Remove usage of querystring from contentscript ([#15112](https://github.com/MetaMask/metamask-extension/pull/15112)) -- Remove web accessible resources from MV3 manifest ([#15238](https://github.com/MetaMask/metamask-extension/pull/15238)) -- Set default getFetchWithTimeout default timeout value ([#14218](https://github.com/MetaMask/metamask-extension/pull/14218)) -- Removed ui related code from shared directory ([#15252](https://github.com/MetaMask/metamask-extension/pull/15252)) -- [FLASK] `snaps-skunkworks@0.18.1` ([#15230](https://github.com/MetaMask/metamask-extension/pull/15230)) -- added storybook files to alert and breadcrumbs component ([#15156](https://github.com/MetaMask/metamask-extension/pull/15156)) -- Send to contract e2e ([#15276](https://github.com/MetaMask/metamask-extension/pull/15276)) -- added storybook component for send-content-stories ([#15210](https://github.com/MetaMask/metamask-extension/pull/15210)) -- Update Node.js version in README ([#15281](https://github.com/MetaMask/metamask-extension/pull/15281)) -- Remove dark mode and transaction insights announcements ([#15279](https://github.com/MetaMask/metamask-extension/pull/15279)) -- skip tests & fix build ([#15280](https://github.com/MetaMask/metamask-extension/pull/15280)) -- Fix invalid build timestamp on certain timezones ([#15245](https://github.com/MetaMask/metamask-extension/pull/15245)) -- Preserve send amount when editing an ERC20 transaction ([#15275](https://github.com/MetaMask/metamask-extension/pull/15275)) -- enable direct routing to the send page ([#15259](https://github.com/MetaMask/metamask-extension/pull/15259)) -- Add goerli, bsc, optimism, polygon, avalance, fantom, arbitrum network to query balances using BalanceChecker ([#13846](https://github.com/MetaMask/metamask-extension/pull/13846)) -- Fix the Sentry error for `eth_getBalance` ([#14953](https://github.com/MetaMask/metamask-extension/pull/14953)) -- Adding media query sass vars, mixins and docs ([#15053](https://github.com/MetaMask/metamask-extension/pull/15053)) -- add e2e test for token add approve action ([#13797](https://github.com/MetaMask/metamask-extension/pull/13797)) -- Bump controllers v30.0.2 ([#14906](https://github.com/MetaMask/metamask-extension/pull/14906)) -- Update the "results" state if "initialResultsState" array length is different ([#15270](https://github.com/MetaMask/metamask-extension/pull/15270)) -- Standardize spelling of 'cancelled' ([#15266](https://github.com/MetaMask/metamask-extension/pull/15266)) -- [E2E] Install Firefox extension from dist folder ([#15255](https://github.com/MetaMask/metamask-extension/pull/15255)) -- [E2E] quit mocha after test ([#15253](https://github.com/MetaMask/metamask-extension/pull/15253)) -- Only send the rpc origin to segment when calling trackevent for newly added custom networks ([#15227](https://github.com/MetaMask/metamask-extension/pull/15227)) -- small approve confirmation ui fixes ([#15239](https://github.com/MetaMask/metamask-extension/pull/15239)) -- Adding "What's New" Notification for Add Popular networks ([#15121](https://github.com/MetaMask/metamask-extension/pull/15121)) -- Remove 'ADD_POPULAR_NETWORKS' feature flag ([#15229](https://github.com/MetaMask/metamask-extension/pull/15229)) -- Removed the Infura v3 key from rpcUrl display ([#15193](https://github.com/MetaMask/metamask-extension/pull/15193)) -- Adding tasks for MV3 test build ([#15133](https://github.com/MetaMask/metamask-extension/pull/15133)) -- Show a block explorer URL hostname, hide token import if block explorer URL is not available ([#15198](https://github.com/MetaMask/metamask-extension/pull/15198)) -- Added metrics for adding a new network ([#15176](https://github.com/MetaMask/metamask-extension/pull/15176)) -- Improve confirm screen tests ([#15163](https://github.com/MetaMask/metamask-extension/pull/15163)) -- Support for ENS wildcard and offchain resolution ([#14675](https://github.com/MetaMask/metamask-extension/pull/14675)) -- removed i18nValue component ([#15179](https://github.com/MetaMask/metamask-extension/pull/15179)) -- Handling invalid prop `loading` console warning ([#15177](https://github.com/MetaMask/metamask-extension/pull/15177)) -- Update confirmation screen styling ([#15136](https://github.com/MetaMask/metamask-extension/pull/15136)) -- NicknamePopover story: convert knobs and actions to controls / args ([#15167](https://github.com/MetaMask/metamask-extension/pull/15167)) -- tabs story changes ([#15147](https://github.com/MetaMask/metamask-extension/pull/15147)) -- Show a tx link and the "create a new swap" link for STX ([#14995](https://github.com/MetaMask/metamask-extension/pull/14995)) +- [FLASK] Add `snap_getBip44Entropy` RPC method and deprecate `snap_getBip44Entropy_*` ([#15706](https://github.com/MetaMask/metamask-extension/pull/15706)) +- [FLASK] Add `snap_getBip32Entropy` JSON-RPC method ([#15619](https://github.com/MetaMask/metamask-extension/pull/15619)) +- [FLASK] Add DApp triggered Snap updates ([#15143](https://github.com/MetaMask/metamask-extension/pull/15143)) + +### Changed +- Update Confirmation screen styling by adding a top margin and moving Site Icon next to the site URL ([#15136](https://github.com/MetaMask/metamask-extension/pull/15136)) +- Remove 'ADD_POPULAR_NETWORKS' feature flag as the feature is enabled by default ([#15229](https://github.com/MetaMask/metamask-extension/pull/15229)) +- Remove dark mode and transaction insights from the "What's New" announcements ([#15279](https://github.com/MetaMask/metamask-extension/pull/15279)) +- Update design tokens package and consolidate shadow values with new tokens ([#15264](https://github.com/MetaMask/metamask-extension/pull/15264)) +- Update Zendesk ticket request URLs for a facilitating the bug reporting process ([#15458](https://github.com/MetaMask/metamask-extension/pull/15458)) +- Update Customize Nonce 'Learn More' link pointing to the correct Zendesk article ([#15658](https://github.com/MetaMask/metamask-extension/pull/15658)) +- Update Avalanche RPC endpoint to point Infura, as it is now supported ([#15720](https://github.com/MetaMask/metamask-extension/pull/15720)) +- Update the main text on SetApprovalForAll confirmation screen ([#15724](https://github.com/MetaMask/metamask-extension/pull/15724)) +- Updated origin pill component to match the new design for Permissions and Switching Networks screens ([#15603](https://github.com/MetaMask/metamask-extension/pull/15603)) +- Set "View full transaction details" as default option on SetApprovalForAll Confirmation screen ([#15726](https://github.com/MetaMask/metamask-extension/pull/15726)) +- Update `gridplus-sdk` ([#15711](https://github.com/MetaMask/metamask-extension/pull/15711)) + - `eth-lattice-keyring` changes: [GridPlus/eth-lattice-keyring@v0.11.0...v0.12.0](https://github.com/GridPlus/eth-lattice-keyring/compare/v0.11.0...v0.12.0) + - `gridplus-sdk` changes: [GridPlus/gridplus-sdk@v2.2.2...v2.2.7](https://github.com/GridPlus/gridplus-sdk/compare/v2.2.2...v2.2.7) +- Update title case to sentence case with some exceptions (names, companies, special terms and page navigation) ([#15285](https://github.com/MetaMask/metamask-extension/pull/15285)) +- Swaps: show a block explorer URL and hide "Add token" prompt, if block explorer URL is not available on Build Quote screen ([#15198](https://github.com/MetaMask/metamask-extension/pull/15198)) +- Swaps: Standardize the spelling of 'cancelled' ([#15266](https://github.com/MetaMask/metamask-extension/pull/15266)) +- Swaps: Performance improvements for Swaps, especially on the Build Quote page (~7.2x faster) ([#15359](https://github.com/MetaMask/metamask-extension/pull/15359)) +- Swaps: only check if a user has enough balance before calling STX. If "Not enough funds" error is thrown, show a notification, but keep STX active ([#15218](https://github.com/MetaMask/metamask-extension/pull/15218)) +- [FLASK] Disable "Mark all as read button" when there are no notifications ([#15333](https://github.com/MetaMask/metamask-extension/pull/15333)) + +### Fixed +- Fix Amount set to 0 on Send page when editing an ERC20 tx by preserving its value ([#15275](https://github.com/MetaMask/metamask-extension/pull/15275)) +- Fix limited scroll area in the Account Menu by adjusting the height of Account Menu nav items, expanding scroll area ([#15302](https://github.com/MetaMask/metamask-extension/pull/15302)) +- Fix Actionable Message overlapping tabs on Confirm Transaction view ([#15272](https://github.com/MetaMask/metamask-extension/pull/15272)) +- Fix Contacts breadcrumb when viewing Contact Details ([#15663](https://github.com/MetaMask/metamask-extension/pull/15663)) +- Fix Blockies identicon alignment in General Settings ([#15652](https://github.com/MetaMask/metamask-extension/pull/15652)) +- Fix extra space and period in Custom Token warning text ([#15650](https://github.com/MetaMask/metamask-extension/pull/15650)) +- Fix Signature Request styles: overlapping text when using hardware wallet and icon shrinking with long URLs ([#15621](https://github.com/MetaMask/metamask-extension/pull/15621)) +- Fix for randomly resets of updated values in network edit form ([#14370](https://github.com/MetaMask/metamask-extension/pull/14370)) +- Fix Connected site popup styling, by aligning the rows, shrinking the site icon with long URLs and preventing size change on Disconnect button hover ([#15409](https://github.com/MetaMask/metamask-extension/pull/15409)) +- Fix Blockies icon on Recipient Details, by ensuring it is used when the option is enabled ([#15662](https://github.com/MetaMask/metamask-extension/pull/15662)) +- Fix casing in Import Token for Spanish locale ([#15687](https://github.com/MetaMask/metamask-extension/pull/15687)) +- Fix approval warning condition for `setApprovalForAll` so it is not shown when revoking ([#15806](https://github.com/MetaMask/metamask-extension/pull/15806)) +- Fix disabled Sign button on the Sign Message screen unless scrolled to the bottom ([#15788](https://github.com/MetaMask/metamask-extension/pull/15788)) +- Swaps: fix displaying "No tokens available matching" when there are tokens available, by updating the `results` state if `initialResultsState` array length is different ([#15270](https://github.com/MetaMask/metamask-extension/pull/15270)) +- Swaps: fix redirect button to the Activity tab, after performing a Swap and clicking "View in Activity" [(#15620)](https://github.com/MetaMask/metamask-extension/pull/15620)) +- [FLASK] Fix missing snap hook for `getAppKey`, the `getUnlockPromise` hook was missing, breaking some snap examples ([#15354](https://github.com/MetaMask/metamask-extension/pull/15354)) +- [FLASK] Fix snaps authorship pill truncation, previously the authorship label would not be truncated and offset the UI ([#15190](https://github.com/MetaMask/metamask-extension/pull/15190)) +- [FLASK] Fix Snaps key management permission copy ([#14849](https://github.com/MetaMask/metamask-extension/pull/14849)) ## [10.18.4] ### Changed @@ -3349,7 +3189,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Uncategorized - Added the ability to restore accounts from seed words. -[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v10.18.4...HEAD +[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v10.19.0...HEAD [10.19.0]: https://github.com/MetaMask/metamask-extension/compare/v10.18.4...v10.19.0 [10.18.4]: https://github.com/MetaMask/metamask-extension/compare/v10.18.3...v10.18.4 [10.18.3]: https://github.com/MetaMask/metamask-extension/compare/v10.18.2...v10.18.3 From 5c970fc0bad788004654f62c829971c9bc6ec184 Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Mon, 19 Sep 2022 10:47:40 -0230 Subject: [PATCH 25/34] Properly configure ethereumjs Common for Sepolia network (#15871) --- app/scripts/controllers/transactions/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/scripts/controllers/transactions/index.js b/app/scripts/controllers/transactions/index.js index 5e78309ef..8e7a2d62f 100644 --- a/app/scripts/controllers/transactions/index.js +++ b/app/scripts/controllers/transactions/index.js @@ -47,6 +47,7 @@ import { EVENT } from '../../../../shared/constants/metametrics'; import { HARDFORKS, MAINNET, + SEPOLIA, NETWORK_TYPE_RPC, CHAIN_ID_TO_GAS_LIMIT_BUFFER_MAP, } from '../../../../shared/constants/network'; @@ -257,7 +258,7 @@ export default class TransactionController extends EventEmitter { // type will be one of our default network names or 'rpc'. the default // network names are sufficient configuration, simply pass the name as the // chain argument in the constructor. - if (type !== NETWORK_TYPE_RPC) { + if (type !== NETWORK_TYPE_RPC && type !== SEPOLIA) { return new Common({ chain: type, hardfork, From 5c41ff0aa1e7b19e8c0182c17a20eed4852c4876 Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Mon, 19 Sep 2022 13:09:28 -0230 Subject: [PATCH 26/34] Ensure New Network Info popup doesn't show when switching to testnets (#15867) * Ensure New Network Info popup doesn't show when switching to testnets * Update ui/pages/routes/routes.component.js Co-authored-by: Alex Donesky * Fix typo * Fix isTestNet property name casing Co-authored-by: Alex Donesky --- ui/pages/routes/routes.component.js | 3 +++ ui/pages/routes/routes.container.js | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ui/pages/routes/routes.component.js b/ui/pages/routes/routes.component.js index 14b2e1e15..b2f484866 100644 --- a/ui/pages/routes/routes.component.js +++ b/ui/pages/routes/routes.component.js @@ -109,6 +109,7 @@ export default class Routes extends Component { isNetworkUsed: PropTypes.bool, allAccountsOnNetworkAreEmpty: PropTypes.bool, isTestNet: PropTypes.bool, + currentChainId: PropTypes.string, }; static contextTypes = { @@ -366,6 +367,7 @@ export default class Routes extends Component { isNetworkUsed, allAccountsOnNetworkAreEmpty, isTestNet, + currentChainId, } = this.props; const loadMessage = loadingMessage || isNetworkLoading @@ -374,6 +376,7 @@ export default class Routes extends Component { const shouldShowNetworkInfo = isUnlocked && + currentChainId && !isTestNet && !isNetworkUsed && allAccountsOnNetworkAreEmpty; diff --git a/ui/pages/routes/routes.container.js b/ui/pages/routes/routes.container.js index 8d02b1399..b70872e64 100644 --- a/ui/pages/routes/routes.container.js +++ b/ui/pages/routes/routes.container.js @@ -9,6 +9,7 @@ import { isNetworkLoading, getTheme, getIsTestnet, + getCurrentChainId, } from '../../selectors'; import { lockMetamask, @@ -45,7 +46,8 @@ function mapStateToProps(state) { sendStage: getSendStage(state), isNetworkUsed: getIsNetworkUsed(state), allAccountsOnNetworkAreEmpty: getAllAccountsOnNetworkAreEmpty(state), - isTestnet: getIsTestnet(state), + isTestNet: getIsTestnet(state), + currentChainId: getCurrentChainId(state), }; } From e6017ee2a4ba57bfe26bbfa146febcef531082cf Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Mon, 19 Sep 2022 15:10:05 -0230 Subject: [PATCH 27/34] Don't display DetectedTokenSelectionPopover if there are no detected tokens (#15877) * Don't display DetectedTokenSelectionPopover if there are no detected tokens * adding length greater than 0 check as a 0 is displayed at the end of teh page previously Co-authored-by: Niranjana Binoy <43930900+NiranjanaBinoy@users.noreply.github.com> Co-authored-by: ryanml --- .../app/detected-token/detected-token.js | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/ui/components/app/detected-token/detected-token.js b/ui/components/app/detected-token/detected-token.js index 5031f218e..608982ea3 100644 --- a/ui/components/app/detected-token/detected-token.js +++ b/ui/components/app/detected-token/detected-token.js @@ -155,15 +155,17 @@ const DetectedToken = ({ setShowDetectedTokens }) => { partiallyIgnoreDetectedTokens={partiallyIgnoreDetectedTokens} /> )} - + {detectedTokens.length > 0 && ( + + )} ); }; From 1bbeb80dff765c9948f72a67687667b5fde3e3ba Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Mon, 19 Sep 2022 15:10:30 -0230 Subject: [PATCH 28/34] Ensure the seed phrase reminder is displayed with precedence over the network deprecation warning (#15869) * Ensure the seed phrase reminder is displayed with precedence over the network deprecation message * Prevent error when attempting to get balance before account info has been fully sete * Fix implementation of seedphrase-reminder-display-fix * Prioritize seed phrase reminder notification over portfolio tooltip, and that tooltip over testnet deprecation --- ui/pages/home/home.component.js | 7 ++++++- ui/pages/home/home.container.js | 10 ++-------- ui/pages/routes/routes.component.js | 14 +++++++++++--- ui/pages/routes/routes.container.js | 4 ++++ ui/selectors/selectors.js | 13 ++++++++++++- 5 files changed, 35 insertions(+), 13 deletions(-) diff --git a/ui/pages/home/home.component.js b/ui/pages/home/home.component.js index ccd454eed..e82a623de 100644 --- a/ui/pages/home/home.component.js +++ b/ui/pages/home/home.component.js @@ -612,6 +612,7 @@ export default class Home extends PureComponent { showRecoveryPhraseReminder, firstTimeFlowType, completedOnboarding, + shouldShowSeedPhraseReminder, } = this.props; if (forgottenPassword) { @@ -658,7 +659,11 @@ export default class Home extends PureComponent { subHeader={ { const { suggestedAssets, seedPhraseBackedUp, - tokens, threeBoxSynced, showRestorePrompt, selectedAddress, connectedStatusPopoverHasBeenShown, defaultHomeActiveTabName, swapsState, - dismissSeedBackUpReminder, firstTimeFlowType, completedOnboarding, } = metamask; - const accountBalance = getCurrentEthBalance(state); const { forgottenPassword, threeBoxLastUpdated } = appState; const totalUnapprovedCount = getTotalUnapprovedCount(state); const swapsEnabled = getSwapsFeatureIsLive(state); @@ -123,10 +120,7 @@ const mapStateToProps = (state) => { suggestedAssets, swapsEnabled, unconfirmedTransactionsCount: unconfirmedTransactionsCountSelector(state), - shouldShowSeedPhraseReminder: - seedPhraseBackedUp === false && - (parseInt(accountBalance, 16) > 0 || tokens.length > 0) && - dismissSeedBackUpReminder === false, + shouldShowSeedPhraseReminder: getShouldShowSeedPhraseReminder(state), isPopup, isNotification, threeBoxSynced, diff --git a/ui/pages/routes/routes.component.js b/ui/pages/routes/routes.component.js index b2f484866..211f0035e 100644 --- a/ui/pages/routes/routes.component.js +++ b/ui/pages/routes/routes.component.js @@ -110,6 +110,8 @@ export default class Routes extends Component { allAccountsOnNetworkAreEmpty: PropTypes.bool, isTestNet: PropTypes.bool, currentChainId: PropTypes.string, + shouldShowSeedPhraseReminder: PropTypes.bool, + portfolioTooltipIsBeingShown: PropTypes.bool, }; static contextTypes = { @@ -368,6 +370,8 @@ export default class Routes extends Component { allAccountsOnNetworkAreEmpty, isTestNet, currentChainId, + shouldShowSeedPhraseReminder, + portfolioTooltipIsBeingShown, } = this.props; const loadMessage = loadingMessage || isNetworkLoading @@ -383,6 +387,12 @@ export default class Routes extends Component { const windowType = getEnvironmentType(); + const shouldShowNetworkDeprecationWarning = + windowType !== ENVIRONMENT_TYPE_NOTIFICATION && + isUnlocked && + !shouldShowSeedPhraseReminder && + !portfolioTooltipIsBeingShown; + return (
- {windowType !== ENVIRONMENT_TYPE_NOTIFICATION && isUnlocked && ( - - )} + {shouldShowNetworkDeprecationWarning && } {shouldShowNetworkInfo && } diff --git a/ui/pages/routes/routes.container.js b/ui/pages/routes/routes.container.js index b70872e64..496a8f2a8 100644 --- a/ui/pages/routes/routes.container.js +++ b/ui/pages/routes/routes.container.js @@ -10,6 +10,8 @@ import { getTheme, getIsTestnet, getCurrentChainId, + getShouldShowSeedPhraseReminder, + getShowPortfolioTooltip, } from '../../selectors'; import { lockMetamask, @@ -48,6 +50,8 @@ function mapStateToProps(state) { allAccountsOnNetworkAreEmpty: getAllAccountsOnNetworkAreEmpty(state), isTestNet: getIsTestnet(state), currentChainId: getCurrentChainId(state), + shouldShowSeedPhraseReminder: getShouldShowSeedPhraseReminder(state), + portfolioTooltipIsBeingShown: getShowPortfolioTooltip(state), }; } diff --git a/ui/selectors/selectors.js b/ui/selectors/selectors.js index 471d30886..bbaa5f874 100644 --- a/ui/selectors/selectors.js +++ b/ui/selectors/selectors.js @@ -442,7 +442,7 @@ export function getTargetAccountWithSendEtherInfo(state, targetAddress) { } export function getCurrentEthBalance(state) { - return getCurrentAccountWithSendEtherInfo(state).balance; + return getCurrentAccountWithSendEtherInfo(state)?.balance; } export function getGasIsLoading(state) { @@ -1209,3 +1209,14 @@ export function getAllAccountsOnNetworkAreEmpty(state) { return hasNoNativeFundsOnAnyAccounts && hasNoTokens; } + +export function getShouldShowSeedPhraseReminder(state) { + const { tokens, seedPhraseBackedUp, dismissSeedBackUpReminder } = + state.metamask; + const accountBalance = getCurrentEthBalance(state) ?? 0; + return ( + seedPhraseBackedUp === false && + (parseInt(accountBalance, 16) > 0 || tokens.length > 0) && + dismissSeedBackUpReminder === false + ); +} From 341d4de8dab627e5da468b242edcf42fe890de55 Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Mon, 19 Sep 2022 15:41:48 -0230 Subject: [PATCH 29/34] Revert "Ensure that 'tokens found in this account' message is only shown when token detection activated (#15823)" (#15879) This reverts commit b359844dc550e2c97e922b2008185b646e7caa04. --- ui/components/app/asset-list/asset-list.js | 13 ++++++++----- ui/selectors/selectors.js | 15 --------------- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/ui/components/app/asset-list/asset-list.js b/ui/components/app/asset-list/asset-list.js index 27b8664f6..a55ed3677 100644 --- a/ui/components/app/asset-list/asset-list.js +++ b/ui/components/app/asset-list/asset-list.js @@ -11,7 +11,7 @@ import { getShouldShowFiat, getNativeCurrencyImage, getDetectedTokensInCurrentNetwork, - getDisplayDetectedTokensLink, + getIstokenDetectionInactiveOnNonMainnetSupportedNetwork, } from '../../../selectors'; import { getNativeCurrency } from '../../../ducks/metamask/metamask'; import { useCurrencyDisplay } from '../../../hooks/useCurrencyDisplay'; @@ -66,7 +66,9 @@ const AssetList = ({ onClickAsset }) => { const primaryTokenImage = useSelector(getNativeCurrencyImage); const detectedTokens = useSelector(getDetectedTokensInCurrentNetwork) || []; - const displayDetectedTokensLink = useSelector(getDisplayDetectedTokensLink); + const istokenDetectionInactiveOnNonMainnetSupportedNetwork = useSelector( + getIstokenDetectionInactiveOnNonMainnetSupportedNetwork, + ); return ( <> @@ -94,9 +96,10 @@ const AssetList = ({ onClickAsset }) => { }); }} /> - {detectedTokens.length > 0 && displayDetectedTokensLink && ( - - )} + {detectedTokens.length > 0 && + !istokenDetectionInactiveOnNonMainnetSupportedNetwork && ( + + )} 0 ? 0 : 4}> Date: Mon, 19 Sep 2022 12:31:45 -0700 Subject: [PATCH 30/34] Bump @metamask/etherscan-link from 2.1.0 to 2.2.0 (#15881) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 891e6332f..65868d4cf 100644 --- a/package.json +++ b/package.json @@ -126,7 +126,7 @@ "@metamask/design-tokens": "^1.9.0", "@metamask/eth-ledger-bridge-keyring": "^0.13.0", "@metamask/eth-token-tracker": "^4.0.0", - "@metamask/etherscan-link": "^2.1.0", + "@metamask/etherscan-link": "^2.2.0", "@metamask/jazzicon": "^2.0.0", "@metamask/logo": "^3.1.1", "@metamask/metamask-eth-abis": "^3.0.0", diff --git a/yarn.lock b/yarn.lock index 75836b0eb..dc69ab270 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3043,10 +3043,10 @@ human-standard-token-abi "^1.0.2" safe-event-emitter "^1.0.1" -"@metamask/etherscan-link@^2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@metamask/etherscan-link/-/etherscan-link-2.1.0.tgz#c0be8e68445b7b83cf85bcc03a56cdf8e256c973" - integrity sha512-ADuWlTUkFfN2vXlz81Bg/0BA+XRor+CdK1055p6k7H6BLIPoDKn9SBOFld9haQFuR9cKh/JYHcnlSIv5R4fUEw== +"@metamask/etherscan-link@^2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@metamask/etherscan-link/-/etherscan-link-2.2.0.tgz#76314d0c1405a0669fc4a0a19e0877bd3d0c389f" + integrity sha512-xUgehvgU+ZbzeJ44m4sUtsyf6Dwou+SlYhiKfi6lkRcbWh6Jl3TCi0YM9C7XWgxfnLSdQBO1ndvcp0kslKgMsA== "@metamask/execution-environments@^0.20.0": version "0.20.0" From 0402e043f8d770802852f2408cc69ff98c5adbcc Mon Sep 17 00:00:00 2001 From: Niranjana Binoy <43930900+NiranjanaBinoy@users.noreply.github.com> Date: Mon, 19 Sep 2022 16:23:21 -0400 Subject: [PATCH 31/34] updating the copy and title on token dettection toggle in advanced settings and notification in import tokens (#15880) --- app/_locales/de/messages.json | 6 ------ app/_locales/el/messages.json | 6 ------ app/_locales/en/messages.json | 18 +++++++++--------- app/_locales/es/messages.json | 6 ------ app/_locales/fr/messages.json | 6 ------ app/_locales/hi/messages.json | 6 ------ app/_locales/id/messages.json | 6 ------ app/_locales/ja/messages.json | 6 ------ app/_locales/ko/messages.json | 6 ------ app/_locales/pt/messages.json | 6 ------ app/_locales/ru/messages.json | 6 ------ app/_locales/tl/messages.json | 6 ------ app/_locales/tr/messages.json | 6 ------ app/_locales/vi/messages.json | 6 ------ ui/helpers/constants/settings.js | 4 ++-- ui/helpers/utils/settings-search.test.js | 8 ++++---- .../import-token/import-token.component.js | 2 +- .../advanced-tab/advanced-tab.component.js | 4 ++-- 18 files changed, 18 insertions(+), 96 deletions(-) diff --git a/app/_locales/de/messages.json b/app/_locales/de/messages.json index 9b6290245..d78a3f854 100644 --- a/app/_locales/de/messages.json +++ b/app/_locales/de/messages.json @@ -3670,12 +3670,6 @@ "tokenDetails": { "message": "Token-Details" }, - "tokenDetection": { - "message": "Token-Erkennung" - }, - "tokenDetectionAlertMessage": { - "message": "Die Token-Erkennung ist derzeit für $1 verfügbar. $2" - }, "tokenId": { "message": "Token-ID" }, diff --git a/app/_locales/el/messages.json b/app/_locales/el/messages.json index 1afdfcc9e..e844d02b3 100644 --- a/app/_locales/el/messages.json +++ b/app/_locales/el/messages.json @@ -3726,12 +3726,6 @@ "tokenDetails": { "message": "Λεπτομέρειες token" }, - "tokenDetection": { - "message": "Εντοπισμός token" - }, - "tokenDetectionAlertMessage": { - "message": "Ο εντοπισμός token είναι επί του παρόντος διαθέσιμος στο $1. $2" - }, "tokenId": { "message": "Αναγνωριστικό token" }, diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index 6240896e7..f69cebb57 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -1228,6 +1228,15 @@ "message": "The RPC URL you have entered returned a different chain ID ($1). Please update the Chain ID to match the RPC URL of the network you are trying to add.", "description": "$1 is the return value of eth_chainId from an RPC endpoint" }, + "enhancedTokenDetection": { + "message": "Enhanced token detection" + }, + "enhancedTokenDetectionAlertMessage": { + "message": "Enhanced token detection is currently available on $1. $2" + }, + "enhancedTokenDetectionDescription": { + "message": "ConsenSys' token API aggregates a list of tokens from various third party token lists. When turned on, tokens will be automatically detected, and searchable, on Ethereum mainnet, Binance, Polygon and Avalanche. When turned off, automatic detection and search can only be done on Ethereum mainnet." + }, "ensIllegalCharacter": { "message": "Illegal character for ENS." }, @@ -3944,15 +3953,6 @@ "tokenDetails": { "message": "Token details" }, - "tokenDetection": { - "message": "Token detection" - }, - "tokenDetectionAlertMessage": { - "message": "Token detection is currently available on $1. $2" - }, - "tokenDetectionDescription": { - "message": "ConsenSys' token API aggregates a list of tokens from various third party token lists. When turned on, tokens will be automatically detected, and searchable, on Ethereum mainnet, Binance, Polygon and Avalanche. When turned off, you will still be able to search for tokens on Ethereum mainnet using MetaMask's legacy token list." - }, "tokenFoundTitle": { "message": "1 new token found" }, diff --git a/app/_locales/es/messages.json b/app/_locales/es/messages.json index ef92cc93a..541bbf579 100644 --- a/app/_locales/es/messages.json +++ b/app/_locales/es/messages.json @@ -3726,12 +3726,6 @@ "tokenDetails": { "message": "Detalles del token" }, - "tokenDetection": { - "message": "Detección del token" - }, - "tokenDetectionAlertMessage": { - "message": "La detección de tókens está actualmente disponible en $1. $2" - }, "tokenId": { "message": "Identificador de Token" }, diff --git a/app/_locales/fr/messages.json b/app/_locales/fr/messages.json index 5befbfd05..43c53f4d7 100644 --- a/app/_locales/fr/messages.json +++ b/app/_locales/fr/messages.json @@ -3726,12 +3726,6 @@ "tokenDetails": { "message": "Détails du token" }, - "tokenDetection": { - "message": "Détection du token" - }, - "tokenDetectionAlertMessage": { - "message": "La détection du token est actuellement disponible sur $1. $2" - }, "tokenId": { "message": "ID de token" }, diff --git a/app/_locales/hi/messages.json b/app/_locales/hi/messages.json index e4855ee24..dd68eaaf1 100644 --- a/app/_locales/hi/messages.json +++ b/app/_locales/hi/messages.json @@ -3726,12 +3726,6 @@ "tokenDetails": { "message": "टोकन विवरण" }, - "tokenDetection": { - "message": "टोकन डिटेक्शन" - }, - "tokenDetectionAlertMessage": { - "message": "फिलहाल टोकन डिटेक्शन $1 पर उपलब्ध है। $2" - }, "tokenId": { "message": "टोकन आइडी" }, diff --git a/app/_locales/id/messages.json b/app/_locales/id/messages.json index 5c7b61784..8063b53d6 100644 --- a/app/_locales/id/messages.json +++ b/app/_locales/id/messages.json @@ -3726,12 +3726,6 @@ "tokenDetails": { "message": "Detail token" }, - "tokenDetection": { - "message": "Deteksi token" - }, - "tokenDetectionAlertMessage": { - "message": "Saat ini deteksi token tersedia di $1. $2" - }, "tokenId": { "message": "ID token" }, diff --git a/app/_locales/ja/messages.json b/app/_locales/ja/messages.json index 6e24b8903..0b9a735fb 100644 --- a/app/_locales/ja/messages.json +++ b/app/_locales/ja/messages.json @@ -3726,12 +3726,6 @@ "tokenDetails": { "message": "トークンの詳細" }, - "tokenDetection": { - "message": "トークン検出" - }, - "tokenDetectionAlertMessage": { - "message": "トークン検出は現在 $1 で利用可能です。$2" - }, "tokenId": { "message": "トークン ID" }, diff --git a/app/_locales/ko/messages.json b/app/_locales/ko/messages.json index c5e1cb03b..f4d108491 100644 --- a/app/_locales/ko/messages.json +++ b/app/_locales/ko/messages.json @@ -3726,12 +3726,6 @@ "tokenDetails": { "message": "토큰 상세 정보" }, - "tokenDetection": { - "message": "토큰 감지" - }, - "tokenDetectionAlertMessage": { - "message": "토큰 감지 기능은 현재 $1. $2에서 사용할 수 있습니다." - }, "tokenId": { "message": "토큰 ID" }, diff --git a/app/_locales/pt/messages.json b/app/_locales/pt/messages.json index 3e6e965b2..4e261ec78 100644 --- a/app/_locales/pt/messages.json +++ b/app/_locales/pt/messages.json @@ -3726,12 +3726,6 @@ "tokenDetails": { "message": "Dados do token" }, - "tokenDetection": { - "message": "Detecção de token" - }, - "tokenDetectionAlertMessage": { - "message": "A detecção de tokens está atualmente disponível em $1. $2" - }, "tokenId": { "message": "ID do token" }, diff --git a/app/_locales/ru/messages.json b/app/_locales/ru/messages.json index 46090715e..a4d0891ab 100644 --- a/app/_locales/ru/messages.json +++ b/app/_locales/ru/messages.json @@ -3726,12 +3726,6 @@ "tokenDetails": { "message": "Сведения о токене" }, - "tokenDetection": { - "message": "Обнаружение токена" - }, - "tokenDetectionAlertMessage": { - "message": "Обнаружение токена в настоящее время доступно на $1. $2" - }, "tokenId": { "message": "Ид. токена" }, diff --git a/app/_locales/tl/messages.json b/app/_locales/tl/messages.json index 72098a20a..04c1f8983 100644 --- a/app/_locales/tl/messages.json +++ b/app/_locales/tl/messages.json @@ -3726,12 +3726,6 @@ "tokenDetails": { "message": "Mga detalye ng token" }, - "tokenDetection": { - "message": "Pagtuklas sa token" - }, - "tokenDetectionAlertMessage": { - "message": "Ang pagtukoy ng token ay kasalukuyang magagamit sa $1. $2" - }, "tokenId": { "message": "Token ID" }, diff --git a/app/_locales/tr/messages.json b/app/_locales/tr/messages.json index 0954b697f..fa30acbdd 100644 --- a/app/_locales/tr/messages.json +++ b/app/_locales/tr/messages.json @@ -3726,12 +3726,6 @@ "tokenDetails": { "message": "Token bilgileri" }, - "tokenDetection": { - "message": "Token algılama" - }, - "tokenDetectionAlertMessage": { - "message": "Token algılama şu anda $1 üzerinden kullanılabilir. $2" - }, "tokenId": { "message": "Token Kimliği" }, diff --git a/app/_locales/vi/messages.json b/app/_locales/vi/messages.json index 6a40728d3..9adab7642 100644 --- a/app/_locales/vi/messages.json +++ b/app/_locales/vi/messages.json @@ -3726,12 +3726,6 @@ "tokenDetails": { "message": "Chi tiết token" }, - "tokenDetection": { - "message": "Phát hiện token" - }, - "tokenDetectionAlertMessage": { - "message": "Tính năng phát hiện token hiện có sẵn trên $1. $2" - }, "tokenId": { "message": "ID Token" }, diff --git a/ui/helpers/constants/settings.js b/ui/helpers/constants/settings.js index fdd41322b..41d998814 100644 --- a/ui/helpers/constants/settings.js +++ b/ui/helpers/constants/settings.js @@ -322,8 +322,8 @@ export const SETTINGS_CONSTANTS = [ }, { tabMessage: (t) => t('advanced'), - sectionMessage: (t) => t('tokenDetection'), - descriptionMessage: (t) => t('tokenDetectionDescription'), + sectionMessage: (t) => t('enhancedTokenDetection'), + descriptionMessage: (t) => t('enhancedTokenDetectionDescription'), route: `${ADVANCED_ROUTE}#token-description`, icon: 'fas fa-sliders-h', }, diff --git a/ui/helpers/utils/settings-search.test.js b/ui/helpers/utils/settings-search.test.js index fbfc69b29..fc8a22b13 100644 --- a/ui/helpers/utils/settings-search.test.js +++ b/ui/helpers/utils/settings-search.test.js @@ -113,10 +113,10 @@ const t = (key) => { return 'Localhost 8545'; case 'experimental': return 'Experimental'; - case 'tokenDetection': - return 'Token detection'; - case 'tokenDetectionDescription': - return "ConsenSys' token API aggregates a list of tokens from various third party token lists. When turned on, tokens will be automatically detected, and searchable, on Ethereum mainnet, Binance, Polygon and Avalanche. When turned off, you will still be able to search for tokens on Ethereum mainnet using MetaMask's legacy token list."; + case 'enhancedTokenDetection': + return 'Enhanced token detection'; + case 'enhancedTokenDetectionDescription': + return "ConsenSys' token API aggregates a list of tokens from various third party token lists. When turned on, tokens will be automatically detected, and searchable, on Ethereum mainnet, Binance, Polygon and Avalanche. When turned off, automatic detection and search can only be done on Ethereum mainnet."; case 'enableEIP1559V2': return 'Enable enhanced gas fee UI'; case 'enableEIP1559V2Description': diff --git a/ui/pages/import-token/import-token.component.js b/ui/pages/import-token/import-token.component.js index 5c4a43c04..50445c903 100644 --- a/ui/pages/import-token/import-token.component.js +++ b/ui/pages/import-token/import-token.component.js @@ -581,7 +581,7 @@ class ImportToken extends Component {
{!useTokenDetection && (
- {t('tokenDetection')} + {t('enhancedTokenDetection')}
- {t('tokenDetectionDescription')} + {t('enhancedTokenDetectionDescription')}
From 9360239e5d95aceff422ab0f29261d933995376e Mon Sep 17 00:00:00 2001 From: Dan Miller Date: Mon, 19 Sep 2022 20:45:11 -0230 Subject: [PATCH 32/34] Update lavamoat policy for v10.19.0 RC, after 0402e04 --- lavamoat/browserify/beta/policy.json | 10 +- lavamoat/browserify/flask/policy.json | 10 +- lavamoat/browserify/main/policy.json | 10 +- lavamoat/build-system/policy.json | 1443 ++++++------------------- 4 files changed, 361 insertions(+), 1112 deletions(-) diff --git a/lavamoat/browserify/beta/policy.json b/lavamoat/browserify/beta/policy.json index 033fd9e34..b9d0b91e1 100644 --- a/lavamoat/browserify/beta/policy.json +++ b/lavamoat/browserify/beta/policy.json @@ -2402,8 +2402,16 @@ }, "@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring>@ethereumjs/tx": { "packages": { - "@ethereumjs/common": true, + "@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring>@ethereumjs/tx>@ethereumjs/common": true, + "browserify>buffer": true, + "ethereumjs-util": true + } + }, + "@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring>@ethereumjs/tx>@ethereumjs/common": { + "packages": { + "@ethereumjs/common>crc-32": true, "browserify>buffer": true, + "browserify>events": true, "ethereumjs-util": true } }, diff --git a/lavamoat/browserify/flask/policy.json b/lavamoat/browserify/flask/policy.json index ef9075582..c3524b0a3 100644 --- a/lavamoat/browserify/flask/policy.json +++ b/lavamoat/browserify/flask/policy.json @@ -2585,8 +2585,16 @@ }, "@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring>@ethereumjs/tx": { "packages": { - "@ethereumjs/common": true, + "@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring>@ethereumjs/tx>@ethereumjs/common": true, + "browserify>buffer": true, + "ethereumjs-util": true + } + }, + "@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring>@ethereumjs/tx>@ethereumjs/common": { + "packages": { + "@ethereumjs/common>crc-32": true, "browserify>buffer": true, + "browserify>events": true, "ethereumjs-util": true } }, diff --git a/lavamoat/browserify/main/policy.json b/lavamoat/browserify/main/policy.json index 033fd9e34..b9d0b91e1 100644 --- a/lavamoat/browserify/main/policy.json +++ b/lavamoat/browserify/main/policy.json @@ -2402,8 +2402,16 @@ }, "@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring>@ethereumjs/tx": { "packages": { - "@ethereumjs/common": true, + "@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring>@ethereumjs/tx>@ethereumjs/common": true, + "browserify>buffer": true, + "ethereumjs-util": true + } + }, + "@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring>@ethereumjs/tx>@ethereumjs/common": { + "packages": { + "@ethereumjs/common>crc-32": true, "browserify>buffer": true, + "browserify>events": true, "ethereumjs-util": true } }, diff --git a/lavamoat/build-system/policy.json b/lavamoat/build-system/policy.json index 8916e1184..0bb487573 100644 --- a/lavamoat/build-system/policy.json +++ b/lavamoat/build-system/policy.json @@ -1852,7 +1852,6 @@ }, "packages": { "chokidar>braces": true, - "chokidar>fsevents": true, "chokidar>glob-parent": true, "chokidar>is-binary-path": true, "chokidar>normalize-path": true, @@ -1879,12 +1878,6 @@ "chokidar>braces>fill-range>to-regex-range>is-number": true } }, - "chokidar>fsevents": { - "globals": { - "process.platform": true - }, - "native": true - }, "chokidar>glob-parent": { "builtin": { "os.platform": true, @@ -4242,7 +4235,6 @@ "gulp-watch>chokidar>anymatch": true, "gulp-watch>chokidar>async-each": true, "gulp-watch>chokidar>braces": true, - "gulp-watch>chokidar>fsevents": true, "gulp-watch>chokidar>is-binary-path": true, "gulp-watch>chokidar>normalize-path": true, "gulp-watch>chokidar>readdirp": true, @@ -4391,1319 +4383,552 @@ "webpack>micromatch>braces>fill-range>repeat-string": true } }, - "gulp-watch>chokidar>fsevents": { + "gulp-watch>chokidar>is-binary-path": { "builtin": { - "events.EventEmitter": true, - "fs.stat": true, - "path.join": true, - "util.inherits": true - }, - "globals": { - "__dirname": true, - "process.nextTick": true, - "process.platform": true, - "setImmediate": true + "path.extname": true }, "packages": { - "gulp-watch>chokidar>fsevents>node-pre-gyp": true + "gulp-watch>chokidar>is-binary-path>binary-extensions": true } }, - "gulp-watch>chokidar>fsevents>node-pre-gyp": { + "gulp-watch>chokidar>readdirp": { "builtin": { - "events.EventEmitter": true, - "fs.existsSync": true, - "fs.readFileSync": true, - "fs.renameSync": true, - "path.dirname": true, - "path.existsSync": true, "path.join": true, - "path.resolve": true, - "url.parse": true, - "url.resolve": true, + "path.relative": true, "util.inherits": true }, "globals": { - "__dirname": true, - "console.log": true, - "process.arch": true, - "process.cwd": true, - "process.env": true, - "process.platform": true, - "process.version.substr": true, - "process.versions": true + "setImmediate": true }, "packages": { - "gulp-watch>chokidar>fsevents>node-pre-gyp>detect-libc": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>semver": true - } - }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>detect-libc": { - "builtin": { - "child_process.spawnSync": true, - "fs.readdirSync": true, - "os.platform": true - }, - "globals": { - "process.env": true + "fs-extra>graceful-fs": true, + "gulp-watch>chokidar>readdirp>micromatch": true, + "readable-stream": true } }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt": { + "gulp-watch>chokidar>readdirp>micromatch": { "builtin": { - "path": true, - "stream.Stream": true, - "url": true + "path.basename": true, + "path.sep": true, + "util.inspect": true }, "globals": { - "console": true, - "process.argv": true, - "process.env.DEBUG_NOPT": true, - "process.env.NOPT_DEBUG": true, "process.platform": true }, "packages": { - "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>abbrev": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv": true + "gulp-watch>chokidar>braces": true, + "gulp-watch>chokidar>readdirp>micromatch>arr-diff": true, + "gulp-watch>chokidar>readdirp>micromatch>array-unique": true, + "gulp-watch>chokidar>readdirp>micromatch>define-property": true, + "gulp-watch>chokidar>readdirp>micromatch>extend-shallow": true, + "gulp-watch>chokidar>readdirp>micromatch>extglob": true, + "gulp-watch>chokidar>readdirp>micromatch>kind-of": true, + "webpack>micromatch>fragment-cache": true, + "webpack>micromatch>nanomatch": true, + "webpack>micromatch>object.pick": true, + "webpack>micromatch>regex-not": true, + "webpack>micromatch>snapdragon": true, + "webpack>micromatch>to-regex": true + } + }, + "gulp-watch>chokidar>readdirp>micromatch>define-property": { + "packages": { + "gulp>gulp-cli>isobject": true, + "webpack>micromatch>define-property>is-descriptor": true } }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv": { - "builtin": { - "child_process.exec": true, - "path": true - }, - "globals": { - "process.env.COMPUTERNAME": true, - "process.env.ComSpec": true, - "process.env.EDITOR": true, - "process.env.HOSTNAME": true, - "process.env.PATH": true, - "process.env.PROMPT": true, - "process.env.PS1": true, - "process.env.Path": true, - "process.env.SHELL": true, - "process.env.USER": true, - "process.env.USERDOMAIN": true, - "process.env.USERNAME": true, - "process.env.VISUAL": true, - "process.env.path": true, - "process.nextTick": true, - "process.platform": true - }, + "gulp-watch>chokidar>readdirp>micromatch>extend-shallow": { "packages": { - "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-homedir": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-tmpdir": true + "gulp-watch>chokidar>readdirp>micromatch>extend-shallow>is-extendable": true, + "webpack>micromatch>extend-shallow>assign-symbols": true } }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-homedir": { - "builtin": { - "os.homedir": true - }, - "globals": { - "process.env": true, - "process.getuid": true, - "process.platform": true + "gulp-watch>chokidar>readdirp>micromatch>extend-shallow>is-extendable": { + "packages": { + "@babel/register>clone-deep>is-plain-object": true } }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-tmpdir": { - "globals": { - "process.env.SystemRoot": true, - "process.env.TEMP": true, - "process.env.TMP": true, - "process.env.TMPDIR": true, - "process.env.windir": true, - "process.platform": true + "gulp-watch>chokidar>readdirp>micromatch>extglob": { + "packages": { + "gulp-watch>chokidar>readdirp>micromatch>array-unique": true, + "gulp-watch>chokidar>readdirp>micromatch>extglob>define-property": true, + "gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets": true, + "gulp-watch>chokidar>readdirp>micromatch>extglob>extend-shallow": true, + "webpack>micromatch>fragment-cache": true, + "webpack>micromatch>regex-not": true, + "webpack>micromatch>snapdragon": true, + "webpack>micromatch>to-regex": true } }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog": { - "builtin": { - "events.EventEmitter": true, - "util": true - }, - "globals": { - "process.nextTick": true, - "process.stderr": true - }, + "gulp-watch>chokidar>readdirp>micromatch>extglob>define-property": { "packages": { - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>console-control-strings": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>set-blocking": true + "webpack>micromatch>define-property>is-descriptor": true } }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet": { - "builtin": { - "events.EventEmitter": true, - "util.inherits": true + "gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets": { + "globals": { + "__filename": true }, "packages": { - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>delegates": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream": true + "gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>debug": true, + "gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property": true, + "gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>extend-shallow": true, + "webpack>micromatch>extglob>expand-brackets>posix-character-classes": true, + "webpack>micromatch>regex-not": true, + "webpack>micromatch>snapdragon": true, + "webpack>micromatch>to-regex": true } }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream": { + "gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>debug": { "builtin": { - "events.EventEmitter": true, - "stream": true, + "fs.SyncWriteStream": true, + "net.Socket": true, + "tty.WriteStream": true, + "tty.isatty": true, "util": true }, "globals": { - "process.browser": true, - "process.env.READABLE_STREAM": true, - "process.stderr": true, - "process.stdout": true, - "process.version.slice": true, - "setImmediate": true + "chrome": true, + "console": true, + "document": true, + "localStorage": true, + "navigator": true, + "process": true }, "packages": { - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>core-util-is": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>isarray": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>process-nextick-args": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>string_decoder": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>util-deprecate": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>inherits": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>tar>safe-buffer": true + "gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>debug>ms": true } }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>core-util-is": { - "globals": { - "Buffer.isBuffer": true + "gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property": { + "packages": { + "gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property>is-descriptor": true } }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>process-nextick-args": { - "globals": { - "process": true + "gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property>is-descriptor": { + "packages": { + "gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-accessor-descriptor": true, + "gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-data-descriptor": true, + "gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property>is-descriptor>kind-of": true } }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>string_decoder": { + "gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-accessor-descriptor": { "packages": { - "gulp-watch>chokidar>fsevents>node-pre-gyp>tar>safe-buffer": true + "gulp-watch>anymatch>micromatch>kind-of": true } }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>util-deprecate": { - "builtin": { - "util.deprecate": true + "gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-data-descriptor": { + "packages": { + "gulp-watch>anymatch>micromatch>kind-of": true + } + }, + "gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>extend-shallow": { + "packages": { + "gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>extend-shallow>is-extendable": true + } + }, + "gulp-watch>chokidar>readdirp>micromatch>extglob>extend-shallow": { + "packages": { + "gulp-watch>chokidar>readdirp>micromatch>extglob>extend-shallow>is-extendable": true } }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge": { + "gulp-watch>chokidar>upath": { "builtin": { - "util.format": true - }, + "path": true + } + }, + "gulp-watch>fancy-log": { "globals": { - "clearInterval": true, - "process": true, - "setImmediate": true, - "setInterval": true + "console": true, + "process.argv.indexOf": true, + "process.stderr.write": true, + "process.stdout.write": true }, "packages": { - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>console-control-strings": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>aproba": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>has-unicode": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>object-assign": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>signal-exit": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>strip-ansi": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>wide-align": true + "fancy-log>ansi-gray": true, + "fancy-log>color-support": true, + "fancy-log>time-stamp": true } }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>has-unicode": { + "gulp-watch>glob-parent": { "builtin": { - "os.type": true + "os.platform": true, + "path": true }, - "globals": { - "process.env.LANG": true, - "process.env.LC_ALL": true, - "process.env.LC_CTYPE": true + "packages": { + "gulp-watch>glob-parent>is-glob": true, + "gulp-watch>glob-parent>path-dirname": true + } + }, + "gulp-watch>glob-parent>is-glob": { + "packages": { + "gulp-watch>glob-parent>is-glob>is-extglob": true } }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>signal-exit": { + "gulp-watch>glob-parent>path-dirname": { "builtin": { - "assert.equal": true, - "events": true + "path": true, + "util.inspect": true }, "globals": { - "process": true + "process.platform": true } }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width": { - "packages": { - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width>code-point-at": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width>is-fullwidth-code-point": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>strip-ansi": true + "gulp-watch>path-is-absolute": { + "globals": { + "process.platform": true } }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width>is-fullwidth-code-point": { + "gulp-watch>vinyl-file": { + "builtin": { + "path.resolve": true + }, + "globals": { + "process.cwd": true + }, "packages": { - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width>is-fullwidth-code-point>number-is-nan": true + "del>globby>pinkie-promise": true, + "fs-extra>graceful-fs": true, + "gulp-watch>vinyl-file>pify": true, + "gulp-watch>vinyl-file>strip-bom": true, + "gulp-watch>vinyl-file>strip-bom-stream": true, + "gulp-watch>vinyl-file>vinyl": true } }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>strip-ansi": { + "gulp-watch>vinyl-file>strip-bom": { + "globals": { + "Buffer.isBuffer": true + }, "packages": { - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>strip-ansi>ansi-regex": true + "gulp>vinyl-fs>remove-bom-buffer>is-utf8": true } }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>wide-align": { + "gulp-watch>vinyl-file>strip-bom-stream": { "packages": { - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width": true - } - }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>set-blocking": { - "globals": { - "process.stderr": true, - "process.stdout": true + "gulp-watch>vinyl-file>strip-bom": true, + "gulp-watch>vinyl-file>strip-bom-stream>first-chunk-stream": true } }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf": { + "gulp-watch>vinyl-file>strip-bom-stream>first-chunk-stream": { "builtin": { - "assert": true, - "fs": true, - "path.join": true + "util.inherits": true }, "globals": { - "process.platform": true, - "setTimeout": true + "Buffer.concat": true, + "setImmediate": true }, "packages": { - "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob": true + "readable-stream": true } }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob": { + "gulp-watch>vinyl-file>vinyl": { "builtin": { - "assert": true, - "events.EventEmitter": true, - "fs.lstat": true, - "fs.lstatSync": true, - "fs.readdir": true, - "fs.readdirSync": true, - "fs.stat": true, - "fs.statSync": true, - "path.join": true, - "path.resolve": true, - "util": true - }, - "globals": { - "console.error": true, - "process.cwd": true, - "process.nextTick": true, - "process.platform": true - }, - "packages": { - "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>fs.realpath": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>inflight": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>inherits": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>minimatch": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>once": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>path-is-absolute": true - } - }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>fs.realpath": { - "builtin": { - "fs.lstat": true, - "fs.lstatSync": true, - "fs.readlink": true, - "fs.readlinkSync": true, - "fs.realpath": true, - "fs.realpathSync": true, - "fs.stat": true, - "fs.statSync": true, - "path.normalize": true, - "path.resolve": true - }, - "globals": { - "console.error": true, - "console.trace": true, - "process.env.NODE_DEBUG": true, - "process.nextTick": true, - "process.noDeprecation": true, - "process.platform": true, - "process.throwDeprecation": true, - "process.traceDeprecation": true, - "process.version": true - } - }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>inflight": { - "globals": { - "process.nextTick": true - }, - "packages": { - "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>once": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>once>wrappy": true - } - }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>inherits": { - "builtin": { - "util.inherits": true - } - }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>minimatch": { - "builtin": { - "path": true - }, - "globals": { - "console.error": true - }, - "packages": { - "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>minimatch>brace-expansion": true - } - }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>minimatch>brace-expansion": { - "packages": { - "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>minimatch>brace-expansion>balanced-match": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>minimatch>brace-expansion>concat-map": true - } - }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>once": { - "packages": { - "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>once>wrappy": true - } - }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>path-is-absolute": { - "globals": { - "process.platform": true - } - }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>semver": { - "globals": { - "console": true, - "process": true - } - }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>tar>safe-buffer": { - "builtin": { - "buffer": true - } - }, - "gulp-watch>chokidar>is-binary-path": { - "builtin": { - "path.extname": true - }, - "packages": { - "gulp-watch>chokidar>is-binary-path>binary-extensions": true - } - }, - "gulp-watch>chokidar>readdirp": { - "builtin": { - "path.join": true, - "path.relative": true, - "util.inherits": true - }, - "globals": { - "setImmediate": true - }, - "packages": { - "fs-extra>graceful-fs": true, - "gulp-watch>chokidar>readdirp>micromatch": true, - "readable-stream": true - } - }, - "gulp-watch>chokidar>readdirp>micromatch": { - "builtin": { - "path.basename": true, - "path.sep": true, - "util.inspect": true - }, - "globals": { - "process.platform": true - }, - "packages": { - "gulp-watch>chokidar>braces": true, - "gulp-watch>chokidar>readdirp>micromatch>arr-diff": true, - "gulp-watch>chokidar>readdirp>micromatch>array-unique": true, - "gulp-watch>chokidar>readdirp>micromatch>define-property": true, - "gulp-watch>chokidar>readdirp>micromatch>extend-shallow": true, - "gulp-watch>chokidar>readdirp>micromatch>extglob": true, - "gulp-watch>chokidar>readdirp>micromatch>kind-of": true, - "webpack>micromatch>fragment-cache": true, - "webpack>micromatch>nanomatch": true, - "webpack>micromatch>object.pick": true, - "webpack>micromatch>regex-not": true, - "webpack>micromatch>snapdragon": true, - "webpack>micromatch>to-regex": true - } - }, - "gulp-watch>chokidar>readdirp>micromatch>define-property": { - "packages": { - "gulp>gulp-cli>isobject": true, - "webpack>micromatch>define-property>is-descriptor": true - } - }, - "gulp-watch>chokidar>readdirp>micromatch>extend-shallow": { - "packages": { - "gulp-watch>chokidar>readdirp>micromatch>extend-shallow>is-extendable": true, - "webpack>micromatch>extend-shallow>assign-symbols": true - } - }, - "gulp-watch>chokidar>readdirp>micromatch>extend-shallow>is-extendable": { - "packages": { - "@babel/register>clone-deep>is-plain-object": true - } - }, - "gulp-watch>chokidar>readdirp>micromatch>extglob": { - "packages": { - "gulp-watch>chokidar>readdirp>micromatch>array-unique": true, - "gulp-watch>chokidar>readdirp>micromatch>extglob>define-property": true, - "gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets": true, - "gulp-watch>chokidar>readdirp>micromatch>extglob>extend-shallow": true, - "webpack>micromatch>fragment-cache": true, - "webpack>micromatch>regex-not": true, - "webpack>micromatch>snapdragon": true, - "webpack>micromatch>to-regex": true - } - }, - "gulp-watch>chokidar>readdirp>micromatch>extglob>define-property": { - "packages": { - "webpack>micromatch>define-property>is-descriptor": true - } - }, - "gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets": { - "globals": { - "__filename": true - }, - "packages": { - "gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>debug": true, - "gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property": true, - "gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>extend-shallow": true, - "webpack>micromatch>extglob>expand-brackets>posix-character-classes": true, - "webpack>micromatch>regex-not": true, - "webpack>micromatch>snapdragon": true, - "webpack>micromatch>to-regex": true - } - }, - "gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>debug": { - "builtin": { - "fs.SyncWriteStream": true, - "net.Socket": true, - "tty.WriteStream": true, - "tty.isatty": true, - "util": true - }, - "globals": { - "chrome": true, - "console": true, - "document": true, - "localStorage": true, - "navigator": true, - "process": true - }, - "packages": { - "gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>debug>ms": true - } - }, - "gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property": { - "packages": { - "gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property>is-descriptor": true - } - }, - "gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property>is-descriptor": { - "packages": { - "gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-accessor-descriptor": true, - "gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-data-descriptor": true, - "gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property>is-descriptor>kind-of": true - } - }, - "gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-accessor-descriptor": { - "packages": { - "gulp-watch>anymatch>micromatch>kind-of": true - } - }, - "gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-data-descriptor": { - "packages": { - "gulp-watch>anymatch>micromatch>kind-of": true - } - }, - "gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>extend-shallow": { - "packages": { - "gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>extend-shallow>is-extendable": true - } - }, - "gulp-watch>chokidar>readdirp>micromatch>extglob>extend-shallow": { - "packages": { - "gulp-watch>chokidar>readdirp>micromatch>extglob>extend-shallow>is-extendable": true - } - }, - "gulp-watch>chokidar>upath": { - "builtin": { - "path": true - } - }, - "gulp-watch>fancy-log": { - "globals": { - "console": true, - "process.argv.indexOf": true, - "process.stderr.write": true, - "process.stdout.write": true - }, - "packages": { - "fancy-log>ansi-gray": true, - "fancy-log>color-support": true, - "fancy-log>time-stamp": true - } - }, - "gulp-watch>glob-parent": { - "builtin": { - "os.platform": true, - "path": true - }, - "packages": { - "gulp-watch>glob-parent>is-glob": true, - "gulp-watch>glob-parent>path-dirname": true - } - }, - "gulp-watch>glob-parent>is-glob": { - "packages": { - "gulp-watch>glob-parent>is-glob>is-extglob": true - } - }, - "gulp-watch>glob-parent>path-dirname": { - "builtin": { - "path": true, - "util.inspect": true - }, - "globals": { - "process.platform": true - } - }, - "gulp-watch>path-is-absolute": { - "globals": { - "process.platform": true - } - }, - "gulp-watch>vinyl-file": { - "builtin": { - "path.resolve": true - }, - "globals": { - "process.cwd": true - }, - "packages": { - "del>globby>pinkie-promise": true, - "fs-extra>graceful-fs": true, - "gulp-watch>vinyl-file>pify": true, - "gulp-watch>vinyl-file>strip-bom": true, - "gulp-watch>vinyl-file>strip-bom-stream": true, - "gulp-watch>vinyl-file>vinyl": true - } - }, - "gulp-watch>vinyl-file>strip-bom": { - "globals": { - "Buffer.isBuffer": true - }, - "packages": { - "gulp>vinyl-fs>remove-bom-buffer>is-utf8": true - } - }, - "gulp-watch>vinyl-file>strip-bom-stream": { - "packages": { - "gulp-watch>vinyl-file>strip-bom": true, - "gulp-watch>vinyl-file>strip-bom-stream>first-chunk-stream": true - } - }, - "gulp-watch>vinyl-file>strip-bom-stream>first-chunk-stream": { - "builtin": { - "util.inherits": true - }, - "globals": { - "Buffer.concat": true, - "setImmediate": true - }, - "packages": { - "readable-stream": true - } - }, - "gulp-watch>vinyl-file>vinyl": { - "builtin": { - "buffer.Buffer": true, - "path.basename": true, - "path.dirname": true, - "path.extname": true, - "path.join": true, - "path.relative": true, - "stream.PassThrough": true, - "stream.Stream": true - }, - "globals": { - "process.cwd": true - }, - "packages": { - "gulp-watch>vinyl-file>vinyl>clone": true, - "gulp-watch>vinyl-file>vinyl>clone-stats": true, - "gulp-watch>vinyl-file>vinyl>replace-ext": true - } - }, - "gulp-watch>vinyl-file>vinyl>clone": { - "globals": { - "Buffer": true - } - }, - "gulp-watch>vinyl-file>vinyl>clone-stats": { - "builtin": { - "fs.Stats": true - } - }, - "gulp-watch>vinyl-file>vinyl>replace-ext": { - "builtin": { - "path.basename": true, - "path.dirname": true, - "path.extname": true, - "path.join": true - } - }, - "gulp-zip": { - "builtin": { - "buffer.constants.MAX_LENGTH": true, - "path.join": true - }, - "packages": { - "gulp-zip>get-stream": true, - "gulp-zip>plugin-error": true, - "gulp-zip>through2": true, - "gulp-zip>yazl": true, - "vinyl": true - } - }, - "gulp-zip>get-stream": { - "builtin": { - "buffer.constants.MAX_LENGTH": true, - "stream.PassThrough": true - }, - "globals": { - "Buffer.concat": true - }, - "packages": { - "pump": true - } - }, - "gulp-zip>plugin-error": { - "builtin": { - "util.inherits": true - }, - "packages": { - "gulp-watch>ansi-colors": true, - "gulp-zip>plugin-error>arr-union": true, - "gulp-zip>plugin-error>extend-shallow": true, - "webpack>micromatch>arr-diff": true - } - }, - "gulp-zip>plugin-error>extend-shallow": { - "packages": { - "gulp-zip>plugin-error>extend-shallow>is-extendable": true, - "webpack>micromatch>extend-shallow>assign-symbols": true - } - }, - "gulp-zip>plugin-error>extend-shallow>is-extendable": { - "packages": { - "@babel/register>clone-deep>is-plain-object": true - } - }, - "gulp-zip>through2": { - "builtin": { - "util.inherits": true - }, - "globals": { - "process.nextTick": true - }, - "packages": { - "gulp-zip>through2>readable-stream": true - } - }, - "gulp-zip>through2>readable-stream": { - "builtin": { - "buffer.Buffer": true, - "events.EventEmitter": true, - "stream": true, - "util": true - }, - "globals": { - "process.env.READABLE_STREAM": true, - "process.nextTick": true, - "process.stderr": true, - "process.stdout": true - }, - "packages": { - "@storybook/api>util-deprecate": true, - "browserify>string_decoder": true, - "pumpify>inherits": true - } - }, - "gulp-zip>yazl": { - "builtin": { - "events.EventEmitter": true, - "fs.createReadStream": true, - "fs.stat": true, - "stream.PassThrough": true, - "stream.Transform": true, - "util.inherits": true, - "zlib.DeflateRaw": true, - "zlib.deflateRaw": true - }, - "globals": { - "Buffer": true, - "setImmediate": true, - "utf8FileName.length": true - }, - "packages": { - "gulp-zip>yazl>buffer-crc32": true - } - }, - "gulp-zip>yazl>buffer-crc32": { - "builtin": { - "buffer.Buffer": true - } - }, - "gulp>glob-watcher": { - "packages": { - "gulp>glob-watcher>anymatch": true, - "gulp>glob-watcher>async-done": true, - "gulp>glob-watcher>chokidar": true, - "gulp>glob-watcher>is-negated-glob": true, - "gulp>glob-watcher>just-debounce": true, - "gulp>undertaker>object.defaults": true - } - }, - "gulp>glob-watcher>anymatch": { - "builtin": { - "path.sep": true - }, - "packages": { - "gulp>glob-watcher>anymatch>micromatch": true, - "gulp>glob-watcher>anymatch>normalize-path": true - } - }, - "gulp>glob-watcher>anymatch>micromatch": { - "builtin": { - "path.basename": true, - "path.sep": true, - "util.inspect": true - }, - "globals": { - "process.platform": true - }, - "packages": { - "3box>ipfs>kind-of": true, - "gulp>glob-watcher>anymatch>micromatch>define-property": true, - "gulp>glob-watcher>anymatch>micromatch>extend-shallow": true, - "gulp>glob-watcher>chokidar>braces": true, - "webpack>micromatch>arr-diff": true, - "webpack>micromatch>array-unique": true, - "webpack>micromatch>extglob": true, - "webpack>micromatch>fragment-cache": true, - "webpack>micromatch>nanomatch": true, - "webpack>micromatch>object.pick": true, - "webpack>micromatch>regex-not": true, - "webpack>micromatch>snapdragon": true, - "webpack>micromatch>to-regex": true - } - }, - "gulp>glob-watcher>anymatch>micromatch>define-property": { - "packages": { - "gulp>gulp-cli>isobject": true, - "webpack>micromatch>define-property>is-descriptor": true - } - }, - "gulp>glob-watcher>anymatch>micromatch>extend-shallow": { - "packages": { - "gulp>glob-watcher>anymatch>micromatch>extend-shallow>is-extendable": true, - "webpack>micromatch>extend-shallow>assign-symbols": true - } - }, - "gulp>glob-watcher>anymatch>micromatch>extend-shallow>is-extendable": { - "packages": { - "@babel/register>clone-deep>is-plain-object": true - } - }, - "gulp>glob-watcher>anymatch>normalize-path": { - "packages": { - "vinyl>remove-trailing-separator": true - } - }, - "gulp>glob-watcher>async-done": { - "builtin": { - "domain.create": true - }, - "globals": { - "process.nextTick": true - }, - "packages": { - "end-of-stream": true, - "gulp>glob-watcher>async-done>process-nextick-args": true, - "gulp>glob-watcher>async-done>stream-exhaust": true, - "pump>once": true - } - }, - "gulp>glob-watcher>async-done>process-nextick-args": { - "globals": { - "process": true - } - }, - "gulp>glob-watcher>async-done>stream-exhaust": { - "builtin": { - "stream.Writable": true, - "util.inherits": true - }, - "globals": { - "setImmediate": true - } - }, - "gulp>glob-watcher>chokidar": { - "builtin": { - "events.EventEmitter": true, - "fs": true, + "buffer.Buffer": true, "path.basename": true, "path.dirname": true, "path.extname": true, "path.join": true, "path.relative": true, - "path.resolve": true, - "path.sep": true + "stream.PassThrough": true, + "stream.Stream": true }, "globals": { - "clearTimeout": true, - "console.error": true, - "process.env.CHOKIDAR_INTERVAL": true, - "process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR": true, - "process.env.CHOKIDAR_USEPOLLING": true, - "process.nextTick": true, - "process.platform": true, - "setTimeout": true - }, - "packages": { - "eslint>is-glob": true, - "gulp-watch>chokidar>async-each": true, - "gulp-watch>glob-parent": true, - "gulp-watch>path-is-absolute": true, - "gulp>glob-watcher>anymatch": true, - "gulp>glob-watcher>chokidar>braces": true, - "gulp>glob-watcher>chokidar>fsevents": true, - "gulp>glob-watcher>chokidar>is-binary-path": true, - "gulp>glob-watcher>chokidar>normalize-path": true, - "gulp>glob-watcher>chokidar>readdirp": true, - "gulp>glob-watcher>chokidar>upath": true, - "pumpify>inherits": true - } - }, - "gulp>glob-watcher>chokidar>braces": { - "packages": { - "gulp>glob-watcher>chokidar>braces>fill-range": true, - "gulp>gulp-cli>isobject": true, - "gulp>undertaker>arr-flatten": true, - "webpack>micromatch>array-unique": true, - "webpack>micromatch>braces>repeat-element": true, - "webpack>micromatch>braces>snapdragon-node": true, - "webpack>micromatch>braces>split-string": true, - "webpack>micromatch>extglob>extend-shallow": true, - "webpack>micromatch>snapdragon": true, - "webpack>micromatch>to-regex": true - } - }, - "gulp>glob-watcher>chokidar>braces>fill-range": { - "builtin": { - "util.inspect": true + "process.cwd": true }, "packages": { - "gulp>glob-watcher>chokidar>braces>fill-range>is-number": true, - "gulp>glob-watcher>chokidar>braces>fill-range>to-regex-range": true, - "webpack>micromatch>braces>fill-range>repeat-string": true, - "webpack>micromatch>extglob>extend-shallow": true - } - }, - "gulp>glob-watcher>chokidar>braces>fill-range>is-number": { - "packages": { - "gulp>glob-watcher>chokidar>braces>fill-range>is-number>kind-of": true - } - }, - "gulp>glob-watcher>chokidar>braces>fill-range>is-number>kind-of": { - "packages": { - "browserify>insert-module-globals>is-buffer": true - } - }, - "gulp>glob-watcher>chokidar>braces>fill-range>to-regex-range": { - "packages": { - "gulp>glob-watcher>chokidar>braces>fill-range>is-number": true, - "webpack>micromatch>braces>fill-range>repeat-string": true + "gulp-watch>vinyl-file>vinyl>clone": true, + "gulp-watch>vinyl-file>vinyl>clone-stats": true, + "gulp-watch>vinyl-file>vinyl>replace-ext": true } }, - "gulp>glob-watcher>chokidar>fsevents": { - "builtin": { - "events.EventEmitter": true, - "fs.stat": true, - "path.join": true, - "util.inherits": true - }, + "gulp-watch>vinyl-file>vinyl>clone": { "globals": { - "__dirname": true, - "process.nextTick": true, - "process.platform": true, - "setImmediate": true - }, - "packages": { - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp": true + "Buffer": true } }, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp": { + "gulp-watch>vinyl-file>vinyl>clone-stats": { "builtin": { - "events.EventEmitter": true, - "fs.existsSync": true, - "fs.readFileSync": true, - "fs.renameSync": true, - "path.dirname": true, - "path.existsSync": true, - "path.join": true, - "path.resolve": true, - "url.parse": true, - "url.resolve": true, - "util.inherits": true - }, - "globals": { - "__dirname": true, - "console.log": true, - "process.arch": true, - "process.cwd": true, - "process.env": true, - "process.platform": true, - "process.version.substr": true, - "process.versions": true - }, - "packages": { - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>detect-libc": true, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>nopt": true, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog": true, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf": true, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>semver": true + "fs.Stats": true } }, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>detect-libc": { + "gulp-watch>vinyl-file>vinyl>replace-ext": { "builtin": { - "child_process.spawnSync": true, - "fs.readdirSync": true, - "os.platform": true - }, - "globals": { - "process.env": true + "path.basename": true, + "path.dirname": true, + "path.extname": true, + "path.join": true } }, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>nopt": { + "gulp-zip": { "builtin": { - "path": true, - "stream.Stream": true, - "url": true - }, - "globals": { - "console": true, - "process.argv": true, - "process.env.DEBUG_NOPT": true, - "process.env.NOPT_DEBUG": true, - "process.platform": true + "buffer.constants.MAX_LENGTH": true, + "path.join": true }, "packages": { - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>nopt>abbrev": true, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>nopt>osenv": true + "gulp-zip>get-stream": true, + "gulp-zip>plugin-error": true, + "gulp-zip>through2": true, + "gulp-zip>yazl": true, + "vinyl": true } }, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>nopt>osenv": { + "gulp-zip>get-stream": { "builtin": { - "child_process.exec": true, - "path": true + "buffer.constants.MAX_LENGTH": true, + "stream.PassThrough": true }, "globals": { - "process.env.COMPUTERNAME": true, - "process.env.ComSpec": true, - "process.env.EDITOR": true, - "process.env.HOSTNAME": true, - "process.env.PATH": true, - "process.env.PROMPT": true, - "process.env.PS1": true, - "process.env.Path": true, - "process.env.SHELL": true, - "process.env.USER": true, - "process.env.USERDOMAIN": true, - "process.env.USERNAME": true, - "process.env.VISUAL": true, - "process.env.path": true, - "process.nextTick": true, - "process.platform": true + "Buffer.concat": true }, "packages": { - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-homedir": true, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-tmpdir": true + "pump": true } }, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-homedir": { + "gulp-zip>plugin-error": { "builtin": { - "os.homedir": true + "util.inherits": true }, - "globals": { - "process.env": true, - "process.getuid": true, - "process.platform": true + "packages": { + "gulp-watch>ansi-colors": true, + "gulp-zip>plugin-error>arr-union": true, + "gulp-zip>plugin-error>extend-shallow": true, + "webpack>micromatch>arr-diff": true } }, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-tmpdir": { - "globals": { - "process.env.SystemRoot": true, - "process.env.TEMP": true, - "process.env.TMP": true, - "process.env.TMPDIR": true, - "process.env.windir": true, - "process.platform": true + "gulp-zip>plugin-error>extend-shallow": { + "packages": { + "gulp-zip>plugin-error>extend-shallow>is-extendable": true, + "webpack>micromatch>extend-shallow>assign-symbols": true } }, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog": { - "builtin": { - "events.EventEmitter": true, - "util": true - }, - "globals": { - "process.nextTick": true, - "process.stderr": true - }, + "gulp-zip>plugin-error>extend-shallow>is-extendable": { "packages": { - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet": true, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>console-control-strings": true, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge": true, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>set-blocking": true + "@babel/register>clone-deep>is-plain-object": true } }, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet": { + "gulp-zip>through2": { "builtin": { - "events.EventEmitter": true, "util.inherits": true }, + "globals": { + "process.nextTick": true + }, "packages": { - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>delegates": true, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream": true + "gulp-zip>through2>readable-stream": true } }, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream": { + "gulp-zip>through2>readable-stream": { "builtin": { + "buffer.Buffer": true, "events.EventEmitter": true, "stream": true, "util": true }, "globals": { - "process.browser": true, "process.env.READABLE_STREAM": true, + "process.nextTick": true, "process.stderr": true, - "process.stdout": true, - "process.version.slice": true, - "setImmediate": true + "process.stdout": true }, "packages": { - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>core-util-is": true, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>isarray": true, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>process-nextick-args": true, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>string_decoder": true, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>util-deprecate": true, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>inherits": true, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>tar>safe-buffer": true - } - }, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>core-util-is": { - "globals": { - "Buffer.isBuffer": true + "@storybook/api>util-deprecate": true, + "browserify>string_decoder": true, + "pumpify>inherits": true } }, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>process-nextick-args": { + "gulp-zip>yazl": { + "builtin": { + "events.EventEmitter": true, + "fs.createReadStream": true, + "fs.stat": true, + "stream.PassThrough": true, + "stream.Transform": true, + "util.inherits": true, + "zlib.DeflateRaw": true, + "zlib.deflateRaw": true + }, "globals": { - "process": true - } - }, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>string_decoder": { + "Buffer": true, + "setImmediate": true, + "utf8FileName.length": true + }, "packages": { - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>tar>safe-buffer": true + "gulp-zip>yazl>buffer-crc32": true } }, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>util-deprecate": { + "gulp-zip>yazl>buffer-crc32": { "builtin": { - "util.deprecate": true + "buffer.Buffer": true } }, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge": { - "builtin": { - "util.format": true - }, - "globals": { - "clearInterval": true, - "process": true, - "setImmediate": true, - "setInterval": true - }, + "gulp>glob-watcher": { "packages": { - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>console-control-strings": true, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>aproba": true, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>has-unicode": true, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>object-assign": true, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>signal-exit": true, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width": true, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>strip-ansi": true, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>wide-align": true + "gulp>glob-watcher>anymatch": true, + "gulp>glob-watcher>async-done": true, + "gulp>glob-watcher>chokidar": true, + "gulp>glob-watcher>is-negated-glob": true, + "gulp>glob-watcher>just-debounce": true, + "gulp>undertaker>object.defaults": true } }, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>has-unicode": { + "gulp>glob-watcher>anymatch": { "builtin": { - "os.type": true + "path.sep": true }, - "globals": { - "process.env.LANG": true, - "process.env.LC_ALL": true, - "process.env.LC_CTYPE": true + "packages": { + "gulp>glob-watcher>anymatch>micromatch": true, + "gulp>glob-watcher>anymatch>normalize-path": true } }, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>signal-exit": { + "gulp>glob-watcher>anymatch>micromatch": { "builtin": { - "assert.equal": true, - "events": true + "path.basename": true, + "path.sep": true, + "util.inspect": true }, "globals": { - "process": true - } - }, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width": { + "process.platform": true + }, "packages": { - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width>code-point-at": true, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width>is-fullwidth-code-point": true, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>strip-ansi": true + "3box>ipfs>kind-of": true, + "gulp>glob-watcher>anymatch>micromatch>define-property": true, + "gulp>glob-watcher>anymatch>micromatch>extend-shallow": true, + "gulp>glob-watcher>chokidar>braces": true, + "webpack>micromatch>arr-diff": true, + "webpack>micromatch>array-unique": true, + "webpack>micromatch>extglob": true, + "webpack>micromatch>fragment-cache": true, + "webpack>micromatch>nanomatch": true, + "webpack>micromatch>object.pick": true, + "webpack>micromatch>regex-not": true, + "webpack>micromatch>snapdragon": true, + "webpack>micromatch>to-regex": true } }, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width>is-fullwidth-code-point": { + "gulp>glob-watcher>anymatch>micromatch>define-property": { "packages": { - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width>is-fullwidth-code-point>number-is-nan": true + "gulp>gulp-cli>isobject": true, + "webpack>micromatch>define-property>is-descriptor": true } }, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>strip-ansi": { + "gulp>glob-watcher>anymatch>micromatch>extend-shallow": { "packages": { - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>strip-ansi>ansi-regex": true + "gulp>glob-watcher>anymatch>micromatch>extend-shallow>is-extendable": true, + "webpack>micromatch>extend-shallow>assign-symbols": true } }, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>wide-align": { + "gulp>glob-watcher>anymatch>micromatch>extend-shallow>is-extendable": { "packages": { - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width": true + "@babel/register>clone-deep>is-plain-object": true } }, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>set-blocking": { - "globals": { - "process.stderr": true, - "process.stdout": true + "gulp>glob-watcher>anymatch>normalize-path": { + "packages": { + "vinyl>remove-trailing-separator": true } }, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf": { + "gulp>glob-watcher>async-done": { "builtin": { - "assert": true, - "fs": true, - "path.join": true + "domain.create": true }, "globals": { - "process.platform": true, - "setTimeout": true + "process.nextTick": true }, "packages": { - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob": true + "end-of-stream": true, + "gulp>glob-watcher>async-done>process-nextick-args": true, + "gulp>glob-watcher>async-done>stream-exhaust": true, + "pump>once": true + } + }, + "gulp>glob-watcher>async-done>process-nextick-args": { + "globals": { + "process": true } }, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob": { + "gulp>glob-watcher>async-done>stream-exhaust": { "builtin": { - "assert": true, - "events.EventEmitter": true, - "fs.lstat": true, - "fs.lstatSync": true, - "fs.readdir": true, - "fs.readdirSync": true, - "fs.stat": true, - "fs.statSync": true, - "path.join": true, - "path.resolve": true, - "util": true + "stream.Writable": true, + "util.inherits": true }, "globals": { - "console.error": true, - "process.cwd": true, - "process.nextTick": true, - "process.platform": true - }, - "packages": { - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>fs.realpath": true, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>inflight": true, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>inherits": true, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>minimatch": true, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>once": true, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>path-is-absolute": true + "setImmediate": true } }, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>fs.realpath": { + "gulp>glob-watcher>chokidar": { "builtin": { - "fs.lstat": true, - "fs.lstatSync": true, - "fs.readlink": true, - "fs.readlinkSync": true, - "fs.realpath": true, - "fs.realpathSync": true, - "fs.stat": true, - "fs.statSync": true, - "path.normalize": true, - "path.resolve": true + "events.EventEmitter": true, + "fs": true, + "path.basename": true, + "path.dirname": true, + "path.extname": true, + "path.join": true, + "path.relative": true, + "path.resolve": true, + "path.sep": true }, "globals": { + "clearTimeout": true, "console.error": true, - "console.trace": true, - "process.env.NODE_DEBUG": true, + "process.env.CHOKIDAR_INTERVAL": true, + "process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR": true, + "process.env.CHOKIDAR_USEPOLLING": true, "process.nextTick": true, - "process.noDeprecation": true, "process.platform": true, - "process.throwDeprecation": true, - "process.traceDeprecation": true, - "process.version": true - } - }, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>inflight": { - "globals": { - "process.nextTick": true + "setTimeout": true }, "packages": { - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>once": true, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>once>wrappy": true + "eslint>is-glob": true, + "gulp-watch>chokidar>async-each": true, + "gulp-watch>glob-parent": true, + "gulp-watch>path-is-absolute": true, + "gulp>glob-watcher>anymatch": true, + "gulp>glob-watcher>chokidar>braces": true, + "gulp>glob-watcher>chokidar>is-binary-path": true, + "gulp>glob-watcher>chokidar>normalize-path": true, + "gulp>glob-watcher>chokidar>readdirp": true, + "gulp>glob-watcher>chokidar>upath": true, + "pumpify>inherits": true } }, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>inherits": { - "builtin": { - "util.inherits": true + "gulp>glob-watcher>chokidar>braces": { + "packages": { + "gulp>glob-watcher>chokidar>braces>fill-range": true, + "gulp>gulp-cli>isobject": true, + "gulp>undertaker>arr-flatten": true, + "webpack>micromatch>array-unique": true, + "webpack>micromatch>braces>repeat-element": true, + "webpack>micromatch>braces>snapdragon-node": true, + "webpack>micromatch>braces>split-string": true, + "webpack>micromatch>extglob>extend-shallow": true, + "webpack>micromatch>snapdragon": true, + "webpack>micromatch>to-regex": true } }, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>minimatch": { + "gulp>glob-watcher>chokidar>braces>fill-range": { "builtin": { - "path": true - }, - "globals": { - "console.error": true + "util.inspect": true }, "packages": { - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>minimatch>brace-expansion": true + "gulp>glob-watcher>chokidar>braces>fill-range>is-number": true, + "gulp>glob-watcher>chokidar>braces>fill-range>to-regex-range": true, + "webpack>micromatch>braces>fill-range>repeat-string": true, + "webpack>micromatch>extglob>extend-shallow": true } }, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>minimatch>brace-expansion": { + "gulp>glob-watcher>chokidar>braces>fill-range>is-number": { "packages": { - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>minimatch>brace-expansion>balanced-match": true, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>minimatch>brace-expansion>concat-map": true + "gulp>glob-watcher>chokidar>braces>fill-range>is-number>kind-of": true } }, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>once": { + "gulp>glob-watcher>chokidar>braces>fill-range>is-number>kind-of": { "packages": { - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>once>wrappy": true - } - }, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>path-is-absolute": { - "globals": { - "process.platform": true - } - }, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>semver": { - "globals": { - "console": true, - "process": true + "browserify>insert-module-globals>is-buffer": true } }, - "gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>tar>safe-buffer": { - "builtin": { - "buffer": true + "gulp>glob-watcher>chokidar>braces>fill-range>to-regex-range": { + "packages": { + "gulp>glob-watcher>chokidar>braces>fill-range>is-number": true, + "webpack>micromatch>braces>fill-range>repeat-string": true } }, "gulp>glob-watcher>chokidar>is-binary-path": { From b497797b60dc5c2c11e68c9bc543a8e828b8314d Mon Sep 17 00:00:00 2001 From: Dan Miller Date: Mon, 19 Sep 2022 21:34:14 -0230 Subject: [PATCH 33/34] Update lavamoat again --- lavamoat/browserify/beta/policy.json | 10 +--------- lavamoat/browserify/flask/policy.json | 10 +--------- lavamoat/browserify/main/policy.json | 10 +--------- 3 files changed, 3 insertions(+), 27 deletions(-) diff --git a/lavamoat/browserify/beta/policy.json b/lavamoat/browserify/beta/policy.json index b9d0b91e1..033fd9e34 100644 --- a/lavamoat/browserify/beta/policy.json +++ b/lavamoat/browserify/beta/policy.json @@ -2402,16 +2402,8 @@ }, "@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring>@ethereumjs/tx": { "packages": { - "@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring>@ethereumjs/tx>@ethereumjs/common": true, - "browserify>buffer": true, - "ethereumjs-util": true - } - }, - "@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring>@ethereumjs/tx>@ethereumjs/common": { - "packages": { - "@ethereumjs/common>crc-32": true, + "@ethereumjs/common": true, "browserify>buffer": true, - "browserify>events": true, "ethereumjs-util": true } }, diff --git a/lavamoat/browserify/flask/policy.json b/lavamoat/browserify/flask/policy.json index c3524b0a3..ef9075582 100644 --- a/lavamoat/browserify/flask/policy.json +++ b/lavamoat/browserify/flask/policy.json @@ -2585,16 +2585,8 @@ }, "@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring>@ethereumjs/tx": { "packages": { - "@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring>@ethereumjs/tx>@ethereumjs/common": true, - "browserify>buffer": true, - "ethereumjs-util": true - } - }, - "@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring>@ethereumjs/tx>@ethereumjs/common": { - "packages": { - "@ethereumjs/common>crc-32": true, + "@ethereumjs/common": true, "browserify>buffer": true, - "browserify>events": true, "ethereumjs-util": true } }, diff --git a/lavamoat/browserify/main/policy.json b/lavamoat/browserify/main/policy.json index b9d0b91e1..033fd9e34 100644 --- a/lavamoat/browserify/main/policy.json +++ b/lavamoat/browserify/main/policy.json @@ -2402,16 +2402,8 @@ }, "@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring>@ethereumjs/tx": { "packages": { - "@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring>@ethereumjs/tx>@ethereumjs/common": true, - "browserify>buffer": true, - "ethereumjs-util": true - } - }, - "@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring>@ethereumjs/tx>@ethereumjs/common": { - "packages": { - "@ethereumjs/common>crc-32": true, + "@ethereumjs/common": true, "browserify>buffer": true, - "browserify>events": true, "ethereumjs-util": true } }, From 1dba5d21394c1cfcb8978a5d6bc5fd0c59f48261 Mon Sep 17 00:00:00 2001 From: ryanml Date: Tue, 20 Sep 2022 10:14:58 -0700 Subject: [PATCH 34/34] Fixing ENS input styling for confusable chars (#15893) --- ui/components/ui/confusable/confusable.component.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/components/ui/confusable/confusable.component.js b/ui/components/ui/confusable/confusable.component.js index b91d93e92..6e1ac6b40 100644 --- a/ui/components/ui/confusable/confusable.component.js +++ b/ui/components/ui/confusable/confusable.component.js @@ -18,7 +18,7 @@ const Confusable = ({ input }) => { return (