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

32 Commits

Author SHA1 Message Date
David Drazic
05dcff85a6
[FLASK] Fix text selection bug in snap ui (#18719)
* Fix text selection bug in snap ui

* Fix template mapping calls in other places

* Fix template mapping calls in snap-prompt
2023-04-24 12:56:44 +02:00
Frederik Bolding
47f4f4008b
[FLASK] Remove unused snaps code (#18565)
* Remove unused code after snap_confirm was removed

* Remove more unused code

* Fix lint
2023-04-17 12:55:08 +02:00
Guillaume Roux
f51055802f
[FLASK] Update snap delineator (#18385) 2023-04-03 18:04:30 +02:00
Alex Donesky
23ca4460cf
Migrate network configurations (previously frequentRpcListDetail) from PreferencesController to NetworkController (#17421) 2023-03-09 15:00:28 -06:00
witmicko
75801e9502
delay chain validation (#17413) 2023-03-08 16:33:27 +00:00
Danica Shen
794f3039f1
feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
Guillaume Roux
85f260c22d
[FLASK] Use custom UI for dialogs (#16973)
* update dialog templates to use custom UI

* add TODO comments

* Fix showDialog hook and destructuring

* Regen LavaMoat policies

* Re-add legacy snap confirmation for now

* Fix circular dependency issue

* Revert change to token-util

* Fix lint

Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
2022-12-20 11:44:22 +01:00
Alex Donesky
f162c58f5a
Allow adding networks with the same chainId as a preloaded/default network via wallet_AddEthereumChain API (#16733)
* allow adding networks with the same chainId as an existing network via API

Co-authored-by: Kurush Dubash <kurush@alchemyapi.io>
2022-12-02 21:14:27 -06:00
Erik Marks
a861cc6dae
[FLASK] Add snap alerts and prompts via snap_dialog RPC method (#16048)
Co-authored-by: Guillaume Roux <guillaumeroux123@gmail.com>
Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
2022-12-01 16:46:06 +01:00
Frederik Bolding
7ba0f78a84
[FLASK] snaps-skunkworks@0.22.0 (#16069)
* snaps-skunkworks@0.22.0

* Update LavaMoat policies

* Bump execution environment and fix a breaking change

* Fix caveat and permissions

* Fix test

* Exclude keyring endowment for now

* Fix test

* Fix snap_confirm missing title
2022-10-07 10:02:35 +02:00
Filip Sekulic
6e13524bcd
Remove related UI code from the app dir (#15384)
Co-authored-by: metamaskbot <metamaskbot@users.noreply.github.com>
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
Co-authored-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
2022-09-16 14:05:21 -05:00
ryanml
4dab986ad2
Consolidating Zendesk URLs in to constants file (#15669) 2022-08-23 09:19:31 -05:00
ryanml
3ad4ab33a8
Fix text alignment in Add a Network popup view (#15520) 2022-08-10 13:37:35 -05:00
Brad Decker
c72199a1a6
update prettier (#15360) 2022-07-31 13:26:40 -05:00
Dan J Miller
aea5c5824f
Clean up of code introduced with 43f7a44 (#15158) 2022-07-27 15:19:05 -05:00
Brad Decker
652d631cda
remove exclusions for mismatched object jsdoc type casing (#15351) 2022-07-27 08:28:05 -05:00
Alex Donesky
d92936475a
Fix default currency symbol for wallet_addEthereumChain + improve warnings for data that doesn't match our validation expectations (#15201)
* set more appropriate default for ticker symbol when wallet_addEthereumChain is called

* throw error to dapp when site suggests network with same chainId but different ticker symbol from already added network, instead of showing error and disabled notification to user
2022-07-18 10:59:38 -05:00
Filip Sekulic
6b4fa46908
Removed the Infura v3 key from rpcUrl display (#15193)
* Removed infura v3 key from rpcUrl display

* Code refactor

* Fixed error

* Prevent submission of form when editing an featured rpc and there is a chainId error

* Add optional chaining to rpcurls to prevent type errors

Co-authored-by: Dan J Miller <danjm.com@gmail.com>
2022-07-14 07:13:56 -02:30
Filip Sekulic
43f7a44c25
Adding popular custom network integration (#14557)
* Initial push

* Refactored the code

* Additional code

* Removed the unused message

* Added a tooltip

* Fixed tests

* Lint fix

* Added style to a tooltip

* Fix e2e test failure

* Lint fix and code revert

* Fix e2e test

* Fixed paddings

* Fixed paddings

* CSS fix

* Minified svg files

* Applied requested changes

* Fixed theme issue

* Code revert

* Added back overridden code

* Icon problem fixed

* Lint fix

* Replaced H3 with H4

* Added unit test

* Added breadcrumbs

* Added const props for networks

* Lint fix

* Lint fix

* Added toggle button for showing the custom network list and resolved few issues

* Fixed routes

* Refactored a piece of code

* Enabled searching for the newly created option

* Fixed unit test

* Updated theme
2022-06-30 13:49:07 -02:30
Daniel
f6576801d4
Fix an edge case with missing top assets in Swaps (#14688)
* If there is no array of top assets in a response, use an empty array

* Set a default empty array for 2 functions, remove an unnecessary condition

* Redirect a user from Swaps to the homepage if they switch to a chain that is not supported in Swaps

* Fix errors in the UI Console when it's not a swaps chain
2022-05-24 18:30:46 +02:00
amerkadicE
8fef9fd8df
Update display of switching current network (#13450)
Co-authored-by: Amer Kadic <amerkadic@Amers-MacBook-Pro.local>
Co-authored-by: George Marshall <george.marshall@consensys.net>
2022-04-25 13:28:52 -05:00
Frederik Bolding
637a960d3c
Use correct casing for "learn more" (#14412) 2022-04-08 18:21:41 +02:00
Guillaume Roux
2454bd8124
confirmation screen dark mode (#14024) 2022-03-18 14:10:20 -07:00
Shane
adce5c558d
Fixed serialization of error parameter for rejectPendingApproval across JSON-RPC (#13847)
* Fixed serialization of error parameter for rejectPendingApproval across JSON-RPC

* Fixed linting

* Added serialize error to add-ethereum-chain
2022-03-10 09:55:25 -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
Hassan Malik
2825b74a55
added extension changes from snaps branch (#13433) 2022-01-28 12:39:32 -05:00
Mark Stacey
3732c5f71e
Add JSDoc ESLint rules (#12112)
ESLint rules have been added to enforce our JSDoc conventions. These
rules were introduced by updating `@metamask/eslint-config` to v9.

Some of the rules have been disabled because the effort to fix all lint
errors was too high. It might be easiest to enable these rules one
directory at a time, or one rule at a time.

Most of the changes in this PR were a result of running
`yarn lint:fix`. There were a handful of manual changes that seemed
obvious and simple to make. Anything beyond that and the rule was left
disabled.
2022-01-07 12:27:33 -03:30
Mark Stacey
3563a246fe
Allow templates without alerts (#13150)
The confirmation page template system allows templates to have alerts,
but it throws an uncaught Promise rejection if a template has no
alerts. This is the unintended side-effect of input validation.

The `getTemplateAlerts` function was updated to always return an array.
The one callsite was updated to expect an empty array if there were no
alerts to render, rather than expecting `undefined`.
2022-01-03 11:32:15 -03:30
Mingliang Liu
e7b82915fa
update scams and network security risks link (#12752) 2021-11-24 15:18:01 -03:30
ryanml
a75092762f
Fix built-in networks switch-ethereum-chain, Including RPC url in switchEthereumChain requestData (#11268)
* Moving RPC Urls to network constants

* Including RPC url in switchEthereumChain requestData

* Setting project id to var

* Fix built-in networks switch-ethereum-chain

`switch-ethereum-chain` did not work correctly with built-in networks.
It was treating them as custom networks, rather than as built-in
networks. This affected how they were displayed in the network
dropdown, and resulted in slight differences to the network stack used
as well.

The problem was that `updateRpcTarget` was used, which was meant for
custom networks only. Now that `setProviderType` is used in the case of
a built-in network, the behaviour should match the network switcher
exactly.

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2021-06-09 15:18:38 -07:00
ryanml
3242710f3d
Supporting existing default networks in switchEthereumChain (#11184) 2021-05-26 09:17:18 -07:00
Brad Decker
09d81ac5f2
remove the ui/app and ui/lib folders (#10911) 2021-04-28 14:53:59 -05:00