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

15618 Commits

Author SHA1 Message Date
Mark Stacey
69e5d6da4a
Make certain network controller methods private (#16883)
Five network controller methods have been renamed to start with an
underscore:
* `getLatestBlock`
* `setNetworkState`
* `setNetworkEIPSupport`
* `clearNetworkDetails`
* `setProviderConfig`

All of these methods were used solely within the network controller.
The leading underscore now documents these methods as being private.

A few tests required updates as well because they were stubbing out one
of these methods.

This should include zero functional changes.

This relates to https://github.com/MetaMask/controllers/issues/971
2022-12-13 15:43:54 -03:30
Mark Stacey
06d87fb98b
Refactor how network state is passed to transaction controller (#16922)
The network state is now passed to the TransactionController via a
getter function and a subscription function, instead of passing one of
the network controller stores directly.

This way of passing the state makes further refactoring easier, as we
don't have to change the input when the store is changed or replaced.
It's also more aligned with our conventions today.

This change was made as part of a larger refactor of the network
controller, as part of the effort to merge the mobile and extension
network controllers.
2022-12-13 15:43:12 -03:30
Ariella Vu
be6edb4bc8
scripts/ui: add tabs.query promise error handler (#16915) 2022-12-14 01:21:32 +07:00
Alex Donesky
6a23dcc68a
remove the ability to navigate back into the onboarding flow after completing onboarding (#16916)
* fix issue when navigating back into the onboarding flow after completing onboarding

* disable navigating back into the onboarding flow

* lint

* fix test

* lint
2022-12-13 12:08:28 -06:00
Daniel
a6da5fd4c3
Add Optimism's L1 fee for an approval tx into total L1 fee in Swaps (#16929) 2022-12-13 18:28:05 +01:00
Mark Stacey
75177c5998
Make setProviderType synchronous (#16879)
The network controller method `setProviderType` was marked as `async`
despite doing nothing async internally. The `async` has been dropped.

This should have zero functional impact.

This relates to https://github.com/MetaMask/controllers/issues/971
2022-12-13 13:57:48 -03:30
Mark Stacey
5df6f653af
Remove unused verifyNetwork method (#16882)
The network controller method `verifyNetwork` has been deleted. It was
unused.

This relates to https://github.com/MetaMask/controllers/issues/971
2022-12-13 13:57:28 -03:30
Ariella Vu
e4e69d86b2
onboardingV2: fix privacy policy in spanish (#16918) 2022-12-14 00:16:10 +07:00
Mark Stacey
add2d2e1d8
Disable LavaMoat for start:test command (#16919)
The `start:test` command no longer uses LavaMoat to run the build
process. `start:test` is meant for local development, so it should have
the same behavior as `start` in this respect, and `start` also does not
use LavaMoat.

This significantly improves build times for local e2e development.
2022-12-13 12:32:09 -03:30
Mark Stacey
6d64951938
Move infuraProjectId to network controller constructor (#16884)
The network controller `setInfuraProjectId` method has been deleted.
The Infura project ID is only ever set upon construction, so it is now
passed in as a constructor parameter instead.

Rather than adding this as a second parameter, the network controller
now uses an "options bag" for constructor parameters. The initial state
was the first parameter, but it's now passed in as the `state` option
instead.

These changes make the API more similar to the mobile network
controller API.

This should have zero functional changes.

This relates to https://github.com/MetaMask/controllers/issues/971

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2022-12-13 12:09:21 -03:30
Frederik Bolding
659063b335
[FLASK] Allow Snaps UI to use Markdown for text formatting (#16911)
* Allow Snaps UI to use Markdown for text formatting

* Fix yarn audit and dedupe errors

* Update LavaMoat policies

* Fix lint

* Add paragraph wrapper component

* Fix lint
2022-12-13 15:37:20 +01:00
Peter Yinusa
f183dc8b3e
[skip e2e] debug using source maps (#16933) 2022-12-13 14:29:38 +00:00
Daniel
c7ceb91d00
Update an E2E test with a mock (#16935) 2022-12-13 10:31:32 -03:30
Vladimir Saric
11f24deef6
Added reject transactions modal to be present in the footer of the approve screen (#16832)
* Added reject transactions modal in the footer

* Use Button component for multiple unapproved tx
2022-12-13 13:33:35 +01:00
Bowen Sanders
720c7e7d16
initial deflakery (#16894) 2022-12-12 12:14:23 -08:00
Mark Stacey
048b7e4cb6
Fix shared mocks in RPC network client test (#16856)
* Fix shared mocks in RPC network client test

Some of the provider api unit tests were inadvertently sharing test
mocks. A `params` object used for mock RPC calls was being shared
between tests and between calls within individual tests. They have been
updated to generate a fresh `params` object for each mock RPC call.

* Explicitly set blockParam to undefined
2022-12-12 13:49:22 -03:30
Jyoti Puri
9a4739c813
User should be able to search setting to batch account balance request (#16887) 2022-12-12 20:35:21 +05:30
David Walsh
dcffa4c7bc
Fix #16804 - Onboarding - Prevent odd behavior with clicks and show/hide password (#16878) 2022-12-12 08:36:02 -06:00
Ariella Vu
4d4e487ffc
Handle extension unloaded and reloaded error: "Extension context invalidated" during dapp use for chromium browsers (#16306)
* dapp: handle ext unloaded or reloaded error

* dapp: handle ext unloaded or reloaded error pt. 2
- use const
- mention case is unsupported in Firefox

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2022-12-12 19:24:12 +07:00
Frederik Bolding
5cca4b9b44
[FLASK] Fix a crash that occurred after a snap confirmation had been approved (#16864)
* Fix a crash that occurred after a snap confirmation had been approved

* Fix lint

* Move code below early return
2022-12-12 12:32:31 +01:00
David Walsh
7a1f75d17f
Fix #16852 - Update support link for BETA (#16853) 2022-12-09 08:01:40 -06:00
Frederik Bolding
c75d2dce55
[FLASK] Implement Snaps UI Renderer (#16605)
* Start implementation of Snaps UI Renderer

* Add snap name and fix some design issues

* Fix lint

* Add some types

* More fixes

* Actually install snaps-ui

* Use JS instead of TS

* Remove unused deps

* Remove dep

* Update LavaMoat policies

* Fix style lint

* Add story

* Small tweaks after rebase

* Remove spacer and add test

* Fix lint

* Remove console.log

* Add error message

* Remove edge-case that doesnt exist anymore

* Update yarn.lock

* Update policy
2022-12-09 13:05:31 +01:00
Bowen Sanders
7e7be2769d
[FLASK] Create E2E test for tx-insights (#16785)
* Created an E2E test for tx-insights.

Co-authored-by: Guillaume Roux <guillaumeroux123@gmail.com>
2022-12-08 12:15:59 -08:00
Frederik Bolding
ff242338a3
[FLASK] snaps-monorepo@0.26.1 (#16839)
* snaps-monorepo@0.26.0

* Regenerate LavaMoat policies

* snaps-monorepo@0.26.1
2022-12-08 19:46:19 +01:00
Jyoti Puri
8125473dc5
Removing flag for EIP1559 V2 support (#16446) 2022-12-09 00:07:06 +05:30
Nidhi Kumari
52304d7910
housekeeping for tag url (#16723)
* housekeeping for tag url

* updated docs for tag url

* updated docs for tag url

* updated tag url component

* updated stories

* updated label

* Some small updates

* Updating test to catch failed propType

Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
2022-12-08 23:57:00 +05:30
Garrett Bear
c9560b75f2
add avatar icon component (#16755)
* add avatar icon component

* add avatar icon severities

* avatar icon docs

* update tests and remove stylesheet

* aria label

* remove aria label

* update test

* remove aria label

* iconName prop type string

* Update ui/components/component-library/avatar-icon/README.mdx

Co-authored-by: George Marshall <george.marshall@consensys.net>

* Update ui/components/component-library/avatar-icon/README.mdx

Co-authored-by: George Marshall <george.marshall@consensys.net>

* Update ui/components/component-library/avatar-icon/avatar-icon.js

Co-authored-by: George Marshall <george.marshall@consensys.net>

* Update ui/components/component-library/avatar-icon/avatar-icon.stories.js

Co-authored-by: George Marshall <george.marshall@consensys.net>

* marginSizeControlOptions

Co-authored-by: George Marshall <george.marshall@consensys.net>
2022-12-08 10:25:19 -08:00
David Walsh
7d3b1d08da
NFTs: Update COLLECTIBLES_V1 to NFTS_V1 (#16851) 2022-12-08 11:37:47 -06:00
David Walsh
43c278d813
Privacy - Show default selected network after a custom network has been added during onboarding (#16789)
* Privacy - Allow users to set a custom RPC from the onboarding process (#16767)

* Privacy - Allow adding custom IPFS from onboarding (#16782)

* Privacy - Show default selected network after a custom network has been added during onboarding

* WIP: Show dropdown list of networks

* Add network switcher to the onboarding advanced privacy screen

* Fix duplicate imports

* Provide default for networks

* Update ui/helpers/utils/ipfs.js

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>

* Fix lint

* Remove unwanted changes

* Fix lint

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2022-12-08 10:42:23 -06:00
Brad Decker
6d1170f06c
upgrade yarn to version 3 (#16232)
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
Co-authored-by: ricky <ricky.miller@gmail.com>
Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
Co-authored-by: legobt <6wbvkn0j@anonaddy.me>
Co-authored-by: Pedro Figueiredo <pedro.figueiredo@consensys.net>
2022-12-08 10:38:04 -06:00
Pedro Figueiredo
3a456a45fc
fix locales for advance config (#16849) 2022-12-08 14:20:59 +00:00
ryanml
a759d427f0
Remove new address alert (#14811)
* Removing new address alert

* remove unused copy

* fix broken e2e test

* rework layout nesting

* satisfy lint

* change layout to fix firefox tests

* change selector specificity on e2e test

* revert test change after fix has been merged from develop

* fix linting

Co-authored-by: Brad Decker <bhdecker84@gmail.com>
Co-authored-by: Pedro Figueiredo <pedro.figueiredo@consensys.net>
2022-12-08 14:20:24 +00:00
Peter Yinusa
c9b42fc966
force background exceptions to show (#16860)
* force background exceptions to show

* fix type
2022-12-08 12:58:34 +00:00
Adnan Sahovic
34b1595f29
Add Celo to the popular custom network list (#16745) 2022-12-07 14:13:37 -06:00
David Walsh
ead5076b86
Privacy - Update metametrics copy during onboarding (#16825) 2022-12-07 12:56:57 -06:00
Filip Sekulic
ddcaaf3e8d
Allow transactions with gas price or priority fee 0 (#16651) 2022-12-07 09:10:10 -06:00
Dan J Miller
36ba4bc8a7
Merge pull request #16827 from MetaMask/master-sync
Master sync PR following v10.23.0
2022-12-07 10:04:47 -03:30
Dan Miller
bc042f96fe Merge remote-tracking branch 'origin/develop' into master-sync 2022-12-06 20:11:16 -03:30
Dan Miller
ce257d8b70 Revert "Use new assets contrller package to fix 0 decimal token bug (#16685)"
This reverts commit 91b635b195.
2022-12-06 20:06:11 -03:30
Dan Miller
388fa59804 Revert "Revert "Added "What's New" Notification for Improved token allowance experience (#16465)""
This reverts commit 5678becb5c.
2022-12-06 19:54:17 -03:30
Dan Miller
5b8f932264 Revert "Revert "Add improved token allowance experience toggle (#16291)""
This reverts commit 1e9d15f647.
2022-12-06 19:54:05 -03:30
Dan J Miller
6af3f9a4fb
Merge pull request #16485 from MetaMask/Version-v10.23.0
Version v10.23.0
2022-12-06 17:08:08 -03:30
amerkadicE
8885c54f13
NFT setApprovalForAll warning popover (#16195)
* NFT setApprovalForAll  warning popover
2022-12-06 14:24:07 -06:00
George Marshall
5592bc5fff
TextField house keeping 🧹 (#16668)
* TextField house keeping updates

* ButtonIcon prop name update and uncontrolled fix

* Updating snapshot
2022-12-06 11:52:03 -08:00
George Marshall
971f153e65
TextFieldBase house keeping 🧹 (#16667)
* TextFieldBase house keeping updates

* Fixing story

* Updating custom input story

* Updating ButtonIcon props and lint issues

* Updating snapshots
2022-12-06 11:51:48 -08:00
Dan J Miller
f48cfca40d Update qs via yarn.lock to 6.5.3 (#16823) 2022-12-06 18:51:30 +00:00
Dan J Miller
1fa213835f
Update qs via yarn.lock to 6.5.3 (#16823) 2022-12-06 18:49:12 +00:00
seaona
40c025f955 Fix Changelog 2022-12-06 18:27:25 +01:00
seaona
89ee4d4a4e Merge branch 'master' into Version-v10.23.0 2022-12-06 18:23:43 +01:00
seaona
54b2c639b8 Remove Token Allowance entries from Changelog 2022-12-06 18:18:28 +01:00