1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 11:22:43 +02:00
Commit Graph

89 Commits

Author SHA1 Message Date
Niranjana Binoy
32aa47ddb2
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
2022-09-15 12:53:18 -02:30
ryanml
7b04bf8b47
Adding Sepolia as a default test network (#15787) 2022-09-14 13:26:45 -05:00
George Marshall
100fbbfaca
Upgrading storybook from 6.3 to 6.5 fixing shell-quote vulnerability (#15684)
* Updating storybook from 6.3 to 6.5

* Some lavamoat policy overrides for eslint
2022-09-06 15:58:22 -07:00
David Walsh
4de0f86a15
Fix storybook by shimming MV3 method (#15749) 2022-09-06 15:56:08 -05:00
Jyoti Puri
99ed42b3dc
MV3: add retry logic to actions (#15337) 2022-09-05 20:25:34 +05:30
Garrett Bear
d25f9cf4da
UI-14395: typography v2 (#15408)
UI-14395: change Typography v2 to Text

UI-14395: upgrade design tokens

UI-14395: add classname testing

UI-14395: update text colors, update font family name to match token, update text storybook boxprops

UI-14395: add text transform docs

lint fix
2022-08-18 10:51:53 -07:00
George Marshall
2e6aea412a
Moving incorrectly ordered page component to correct pages category (#15426) 2022-08-03 08:56:32 -05:00
George Marshall
5d828be611
Adding shadow docs to storybook (#15388)
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2022-08-01 08:04:44 -05:00
Nidhi Kumari
7424e98416
Updated all instances of "Component API" to "Props" in storybook documentation (#15324)
* replaced Component API with Props

* replaced Component API with Props in DOCUMENTATION.stories.mdx

* removed base avatar component
2022-07-27 00:22:40 +05:30
Nidhi Kumari
2e6f579ee5
Converted BuildQuote story to use controls and action argType (#15234)
* added build quote component

* fixed updated test-data to use Rinkeby instead of ropsten
2022-07-22 12:14:35 +05:30
George Marshall
5592687df1
Updating design tokens package and shadow values with new tokens (#15264)
* Updating design tokens v1.8 and shadows

* Adding missing stories

* Some fixes and updates to css and stories

* removing unneeded story

* Fixing story order
2022-07-21 15:43:31 -07:00
Nidhi Kumari
7a3ff7e436
added storybook component for send-content-stories (#15210)
* added storybook component for send-content-stories

* added draftTransactions to storybook
2022-07-19 14:05:45 +05:30
George Marshall
81a876f979
Adding media query sass vars, mixins and docs (#15053)
* Adding media query sass vars, mixins and docs

* Updates to docs and fixing page order in storybook
2022-07-18 08:23:27 -07:00
Ariella Vu
e60af93f2a
Storybook: add TransactionListItem component page (#14786)
* TransactionListItem: add storybook page

* SB:TransactionListItem: update retry status

* SB:TranslationListItem: exclude CANCEL & RETRY

* TransactionListItem: exclude SIGNED status

* TransactionListItem: fix mock transactions

* SB:TransactionListItem: add isEarliestNonce param

* SB:TransactionListItem: fix args

* SB:TransactionListItem: add "Speed Up" params

* SB: add nonce to mock transactions
2022-06-03 12:50:23 -05:00
George Marshall
87bba78d1f
Updating all instances of Metamask to MetaMask in content, comments and tests (#14848) 2022-06-03 09:32:50 -07:00
George Marshall
8fcbebc546
Update design tokens library from 1.5 to 1.6 WIP (#14732)
* Updating account menu icon color

* Updating design-tokens and making appropriate updates to extension styles

* Adding more deprecated tags to colors

* Adding spinner and removing todo comment

* Remove comment

* Updates

* Updating snapshots

* More color and ui updates

* reverting transition change
2022-05-25 08:35:36 -07:00
Niranjana Binoy
0a10b425ea
Add New Tokens Found page (#14366) 2022-05-09 13:47:06 -04:00
Erik Marks
cef95f8733
Stop storing request and response objects in the permission activity log (#14485)
We currently store the JSON-RPC request and response objects in the permission activity log. The utility of doing this was always rather dubious, but never problematic. Until now.

In Flask, as the restricted methods have expanded in number, user secrets may be included on JSON-RPC message objects. This PR removes these properties from the permission activity log, and adds a migration which does the same to existing log objects. We don't interact with the log objects anywhere in our codebase, but we don't want unexpected properties to cause errors in the future should any log objects be retained.

This PR also updates relevant tests and test data. It makes a minor functional change to how a request is designated as a success or failure, but this should not change any behavior in practice.
2022-04-21 08:44:15 -07:00
filipsekulic
8cb1f4af2e
Renamed metametrics.new.js to metametrics.js (#14327) 2022-04-01 14:11:12 -05:00
Niranjana Binoy
afcc3a8f26
Token Value component for Tokens Detected page (#14274) 2022-04-01 11:52:22 -04:00
filipsekulic
59131f5da5
Deleted the old metametrics.js (#14292) 2022-03-31 12:10:19 -05:00
VSaric
8184b150cb
Redesign screen/page "List of networks" (#13560)
Co-authored-by: George Marshall <george.marshall@consensys.net>
Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
2022-03-31 09:41:39 -05:00
Alex Donesky
524e0aaf07
unbreak storybook (#14059) 2022-03-18 19:04:59 -05:00
David Walsh
b0c050fece
Dark Mode: Create Theme-friendly top left logo component (#13897)
Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
2022-03-11 10:45:13 -06:00
Guillaume Roux
23e6c073c4
Dark Theme setup and button theming (#13651)
* Add design-tokens and apply colors to button

* swap more colors

* tweak button and add dark theme switch to storybook

* tweak buttons

* fix typo

* remove comments

* add dep to ignored list

* fix linting issue

* fix linting issues

* Updating some styles and removing some deprecated buttons (#13742)

* Updating some styles and removing some deprecated buttons

* Warning button fixes

* Fixing warning text for darkmode

* bump design tokens and update storybook theme strategy

Co-authored-by: George Marshall <george.marshall@consensys.net>
2022-02-25 14:11:22 -08:00
George Marshall
a1eaa33b45
Installing design tokens and writing docs in storybook (#13657)
* Installing design tokens and writing docs in storybook

* Adding design-tokens to dep check ignore

* Link updates, Sentence casing, better css code formatting, other grammer fixes
2022-02-22 18:26:11 -08:00
Erik Marks
35ac762e10
Add Snaps via Flask (#13462)
This PR adds `snaps` under Flask build flags to the extension. This branch is mostly equivalent to the current production version of Flask, excepting some bug fixes and tweaks.

Closes #11626
2022-02-14 16:02:51 -08:00
Ariella Vu
a5b114c4f9
Use ActionableMessage for ConfirmAddSuggestionToken warnings (#13402)
* ConfirmAddSuggestedToken: update duplicate logic

* ConfirmAddSuggestedToken: update duplicate fn names

* ConfirmAddSuggestedToken: add ActionableMessage
- fixes #13347

* base-styles.scss: deprecate .warning

* ConfirmAddSuggestedTokens: update @param desc

Co-authored-by: Alex Donesky <adonesky@gmail.com>

* ConfirmAddSuggestedTokens: update @param desc

Co-authored-by: Alex Donesky <adonesky@gmail.com>

* ConfirmAddSuggestedTokens: update @param desc

Co-authored-by: Alex Donesky <adonesky@gmail.com>

* ConfirmAddSuggestedTokens: update @param desc

Co-authored-by: Alex Donesky <adonesky@gmail.com>

* ConfirmAddSuggestedToken: clean JSDoc comments
- following GitHub suggestion commits

* ConfirmAddSuggestedToken: warning Learn More btn

* add zendesk-url constants
- use for ConfirmAddSuggestedToken & ImportToken pages

* storybook: add ConfirmAddSuggestedToken controls

* stories: add ConfirmAddSuggestedTokens states

* stories: rm unused args ConfirmAddSuggestedToken

* rn ZENDESK_URL -> ZENDESK_URLS

* AddSuggestedToken: check case-insensitive symbols

Co-authored-by: Alex Donesky <adonesky@gmail.com>
2022-02-01 15:30:15 +00:00
George Marshall
4af7f250a2
Updating storybook docs (#13055)
* Updating and moving docs to .storybook/ folder and updating Button to be the standard of docs we want to strive for

* Capitalizing API
2022-01-07 12:30:37 -08:00
George Marshall
c95da7dbb6
Updating storybook webpack config and changing font paths (#13028) 2022-01-04 16:41:10 -08:00
Alex Donesky
1b6e58c417
Feat/collectibles the return (#12970)
* Wire collectibles frontend UI with controller data
2021-12-13 17:41:10 -06:00
Erik Marks
c03b6dd19b
Subject metadata cleanup (#13090)
This PR fixes some subject metadata-related issues that were missed in #13026.
2021-12-13 12:10:20 -08:00
Erik Marks
31cf7c10a4
Permission System 2.0 (#12243)
# Permission System 2.0

## Background

This PR migrates the extension permission system to [the new `PermissionController`](https://github.com/MetaMask/snaps-skunkworks/tree/main/packages/controllers/src/permissions).
The original permission system, based on [`rpc-cap`](https://github.com/MetaMask/rpc-cap), introduced [`ZCAP-LD`](https://w3c-ccg.github.io/zcap-ld/)-like permissions to our JSON-RPC stack.
We used it to [implement](https://github.com/MetaMask/metamask-extension/pull/7004) what we called "LoginPerSite" in [version 7.7.0](https://github.com/MetaMask/metamask-extension/releases/tag/v7.7.0) of the extension, which enabled the user to choose which accounts, if any, should be exposed to each dapp.
While that was a worthwhile feature in and of itself, we wanted a permission _system_ in order to enable everything we are going to with Snaps.
Unfortunately, the original permission system was difficult to use, and necessitated the creation of the original `PermissionsController` (note the "s"), which was more or less a wrapper for `rpc-cap`.

With this PR, we shake off the yoke of the original permission system, in favor of the modular, self-contained, ergonomic, and more mature permission system 2.0.

Note that [the `PermissionController` readme](https://github.com/MetaMask/snaps-skunkworks/tree/main/packages/controllers/src/permissions/README.md) explains how the new permission system works.

The `PermissionController` and `SubjectMetadataController` are currently shipped via `@metamask/snap-controllers`. This is a temporary state of affairs, and we'll move them to `@metamask/controllers` once they've landed in prod.

## Changes in Detail

First, the changes in this PR are not as big as they seem. Roughly half of the additions in this PR are fixtures in the test for the new migration (number 68), and a significant portion of the remaining ~2500 lines are due to find-and-replace changes in other test fixtures and UI files.

- The extension `PermissionsController` has been deleted, and completely replaced with the new `PermissionController` from [`@metamask/snap-controllers`](https://www.npmjs.com/package/@metamask/snap-controllers).
- The original `PermissionsController` "domain metadata" functionality is now managed by the new `SubjectMetadataController`, also from [`@metamask/snap-controllers`](https://www.npmjs.com/package/@metamask/snap-controllers).
- The permission activity and history log controller has been renamed `PermissionLogController` and has its own top-level state key, but is otherwise functionally equivalent to the existing implementation.
- Migration number 68 has been added to account for the new state changes.
- The tests in `app/scripts/controllers/permissions` have been migrated from `mocha` to `jest`.

Reviewers should focus their attention on the following files:

- `app/scripts/`
  - `metamask-controller.js`
    - This is where most of the integration work for the new `PermissionController` occurs.
      Some functions that were internal to the original controller were moved here.
  - `controllers/permissions/`
    - `selectors.js`
      - These selectors are for `ControllerMessenger` selector subscriptions. The actual subscriptions occur in `metamask-controller.js`. See the `ControllerMessenger` implementation for details.
    - `specifications.js`
      - The caveat and permission specifications are required by the new `PermissionController`, and are used to specify the `eth_accounts` permission and its JSON-RPC method implementation.
        See the `PermissionController` readme for details.
  - `migrations/068.js`
    - The new state should be cross-referenced with the controllers that manage it.
      The accompanying tests should also be thoroughly reviewed.

Some files may appear new but have just moved and/or been renamed:

- `app/scripts/lib/rpc-method-middleware/handlers/request-accounts.js`
  - This was previously implemented in `controllers/permissions/permissionsMethodMiddleware.js`.
- `test/mocks/permissions.js`
  - A truncated version of `test/mocks/permission-controller.js`.

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2021-12-06 19:16:49 -08:00
George Marshall
3054991c9b
Updating styles so they don't override fontawesome, removing duplicate addons (#12971) 2021-12-06 15:55:21 -08:00
George Marshall
4cd957953d
Updating Storybook base styles (#12862)
* Adding branding and updating styles for storybook docs

* Making code blocks light gray
2021-12-02 09:11:35 -08:00
George Marshall
854fc71ae7
Organizing storybook to echo app folder structure (#12796)
* Organizing storybook to echo app folder structure

* Updating new stories to follow new convention from develop
2021-12-01 11:27:57 -08:00
George Marshall
d72f7295a3
Docs/12367 Adding storybook essentials addons (#12393)
* Adding storybook essentials and documentation contribution guidelines

* Deprecation updates

* Update ui/2.DOCUMENTATION.stories.mdx

Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>

* Updating spelling and adding label to i18n-party plugin in toolbar

Co-authored-by: kumavis <kumavis@users.noreply.github.com>
Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
2021-10-29 07:22:07 -10:00
Niranjana Binoy
532927368d
Network Form Design and switch to full screen enhancements (#12302) 2021-10-25 16:38:43 -04:00
Etienne Dusseault
be0508d41e
Add send-hex-data-row to Storybook (#12085)
* send-hex-data

* id filename

* lint
2021-10-15 09:32:13 -02:30
Etienne Dusseault
1e5c0078dd
Add send-asset-row to Storybook (#12081)
* send-asset

* id filename
2021-10-15 09:30:36 -02:30
Etienne Dusseault
9de632e9d1
Fix contact-list Storybook (#12262) 2021-10-05 09:13:07 -05:00
ryanml
f741712255
Fixing confirmation screen storybook views (#12271) 2021-10-04 06:46:18 -07:00
ryanml
c14f46eb92
Fixing confirm-add-suggested-token storybook entry (#12261) 2021-10-01 09:07:29 -07:00
Etienne Dusseault
bf89226ca1
Add send-header to Storybook (#12084) 2021-09-29 13:43:18 -05:00
Etienne Dusseault
c2bbbdd19c
Add account-list component to Storybook (#12228) 2021-09-29 13:42:49 -05:00
Etienne Dusseault
bf4e565497
edit-gas-display (#12165) 2021-09-23 22:40:03 -03:00
Etienne Dusseault
3ec3baa3a1
send-content (#12167) 2021-09-23 22:39:22 -03:00
Etienne Dusseault
6b7444c257
Add add-recipient to Storybook (#12076) 2021-09-20 14:05:58 -05:00
kumavis
f472c2615a
CI - add metamaskbot comment "highlights" section for showing relevant storybook changes (#12095)
* ci/announce/highlight - add bot announcement section for "highlights" showing off important diffs + storybook highlights

* ci/announce/highlight - fix announcement message

* Update index.js

* xxx tmp xxx

* ci/announce/highlight - fix dirty file calculation

* ci/announce/highlight - try/catch wrap highlight generation for build stability

* ui - put fox emojis in the mascot component

* ci/announce/highlight - start storybook permalinks

* ci/announce/highlight - fix storybook permalink util

* ci/announce/highlight - fix storybook permalink util

* ci/announce/highlight - small styling fix

* storybook - use any easily predictable story id

* ci/announce/highlight - revert sample commit

* ci/announce/highlight - minimal documentation
2021-09-15 08:55:48 -10:00
Etienne Dusseault
d1d01f434d
Add contact-list-tab to Storybook (#12079) 2021-09-13 16:04:31 -05:00