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

173 Commits

Author SHA1 Message Date
Mark Stacey
4f66dc948f
Update @metamask/controllers to v33 (#16493)
The controllers package has been updated to v33. The only breaking
change in this release was to rename the term "collectible" to "NFT"
wherever it appeared in the API.

Changes in this PR have been kept minimal; additional renaming can be
done in separate PRs. This PR only updates the controller names,
controller state, controller methods, and any direct references to
these things. NFTs are still called "collectibles" in most places.
2022-11-15 15:19:42 -03:30
Ariella Vu
a87c1750b0
MV3: Update service worker restart logic and keep-alive logic for dapp support (#16075)
* dapp: add debug statements

* dapp: add retry logic [debug]

* dapp: keep SW alive on rpc request

* Revert "dapp: add debug statements"

This reverts commit ea21786f7f66c712eea02405cd68fe925d227ffa.

* dapp: try to set up ext streams asap on reset

* dapp: apply keep alive logic to phishingPageStream

* dapp:put keep-alive logic behind isManifestV3 flag

* Re-activate streams after a period of service worker in-activity

* dapp: rm extra function

* dapp: update phishing onDisconnect

* dapp: fix eslint missing global chrome

* add EXTENSION_MESSAGES const

* use EXTENSION_MESSAGES more generic comment

* update comment

* dapp: clean timeout and interval

* Fix DAPP action replay

* execute DAPP action replay for only MV3

* fix

* fix

* fix

* comment out DAPP action replay code

* fix

* fix

* fix

* scripts/background: use browser polyfill

* Revert "scripts/background: use browser polyfill"

This reverts commit 2ab6234d11b3b11e10dd993d454eeaad63bfc886.

* scripts/background: use browser polyfill

* script/background: check lastError

* dapp: use EXTENSION_MESSAGES

* scripts/background: send ready msg to all tabs

* dapp: update onMessage handler comment and name

* dapp: return values onMessage listener
see: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/onMessage#addlistener_syntax

* dapp: mv onMessage listener

* dapp: add onMessage setupPhishingExtStreams

* dapp: rn reset -> destroy streams

* dapp: rn reset -> destroy for phishing streams

* dapp: clean comment

* dapp: rm unused comments
planning to be readded in follow-up PR: #16250

* dapp: onMessage return Promise|undefined

* dapp:clean: add missing undefined return type

* dapp: use new checkForErrorAndLog for Chrome API
handy stackoverflow: https://stackoverflow.com/a/28432087/4053142

* dapp:fix: return tabs.query result

* dapp:eslint: return undefined
fix Expected to return a value at the end of arrow
function.eslintconsistent-return

* background: do not query tabs w/out url

* background: rm Could not establish... catch
- no longer needed after improved tabs query

* dapp:clean: rm unused checkForError... for now...

* dapp: prevent setupExtensionStreams called twice
- calling connect will trigger disconnect and may cause issues
- only setup streams if they are not connected

* dapp: handle onDisconnect lastError
- throwing errors from contentscript will break the dapp, so only warn
- not handling lastError when it's found will also break the dapp

* background: update tabs.query url comment

* background: update tabs.query url comment 2

* dapp: fix SW restart for multi dapp support
- ref: https://stackoverflow.com/a/54686484/4053142

* dapp:clean: rm extra "." from console.warn

* clean: comments for dapp and background

* Adding catch block (#16454)

* fix: FireFox provider injection

* lib/util: fix invalid checkForErrorAndWarn export

* bg: add explanation for tabs.sendMessage catch

* dapp: add browser-runtime.utils

* runtime.utils: add checkForLastErrorAndLog

Co-authored-by: Jyoti Puri <jyotipuri@gmail.com>
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2022-11-15 00:18:08 +07:00
David Drazic
5e746dcc2f
[FLASK] Add snap cronjobs (#16239)
* Add Cronjob controller configuration

* Add Cronjob permission icon and description

* Add lint fix changes

* Add missing action to the allow-list

* Fix permission

* Fix icon and message

Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
2022-11-09 13:18:47 +01:00
Daniel
1a9ebab828
Enable new networks for Swaps (#16396) 2022-11-08 19:14:17 +01:00
Frederik Bolding
de3068d932
[FLASK] snaps-monorepo@0.23.0 (#16394)
* snaps-monorepo@0.23.0

* Regen LavaMoat policies

* Update iframe-execution-environment

* Fix tests

* Bump luxon

* Fix lint

* Update test-snaps

* Bump post-message-stream

* Fix E2E
2022-11-08 10:31:22 +01:00
Erik Marks
a8c1756816
Remove 3box feature and delete ThreeBoxController (#14571)
* Remove 3box feature and delete ThreeBoxController

Lint locale messages

lavamoat policy updates

* Restore 3Box user trait with value `false`

The 3Box user trait has been restored and hard-coded as `false`. This
ensures that users don't get stuck in our metrics as having this trait.

A deprecation comment has been left in various places for this trait.

* Remove unused state

* Remove additional 3box-related things

* Run `yarn-deduplicate`

* Restore migration that was lost while rebasing

* Remove obsolete override

* Remove additional unused resolutions/dependencies

* Update LavaMoat policies

* Remove obsolete security advisory ignore entries

* Remove 3Box fixture builder method

* Update unit tests

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2022-10-31 13:50:50 -02:30
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
Niranjana Binoy
29c2b136b8
Replace setInterval with chrome alarms for MetaMetrics FinalizeEventFragment (#16003) 2022-10-04 13:03:50 -04:00
Alex Jupiter
0a0eb207e8
Hardware wallet copy updates, referral and tutorial buttons (#14738)
Co-authored-by: ryanml <ryanlanese@gmail.com>
Co-authored-by: Alex Donesky <adonesky@gmail.com>
2022-10-04 10:16:57 -05:00
Filip Sekulic
02d7eb34c9
Add Aurora to the popular custom network list (#16039)
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2022-10-03 14:55:54 -05:00
Nicolas Ferro
47f136380f
Ability to buy native currency and tokens on Optimism and Arbitrum, using Transak (#16031) 2022-09-29 09:47:41 -05:00
ryanml
0bc1eeaf37
Deprecating the Rinkeby, Ropsten, and Kovan test networks (#15989)
* Deprecating Rinkeby, setting default debug network to Goerli

* Deprecating Ropsten and Kovan

* Conflict fix

* Remove unused localization, test fixes

* Add migration for moving used deprecated testnets to custom networks

* Fix migrator test

* Add more unit tests

* Migration updates provider type to rpc if deprecated network is selected

* Migration fully and correctly updates the provider if selected network is a deprecated testnet

* Continue to show deprecation warning on each of rinkeby, ropsten and kovan

* Add rpcUrl deprecation message to loading screen

* Removing mayBeFauceting prop

Co-authored-by: Dan Miller <danjm.com@gmail.com>
2022-09-28 20:26:01 -07:00
Nicolas Ferro
18ca016cf0
Ability to buy tokens with Wyre (#15992) 2022-09-28 09:41:56 -05:00
Niranjana Binoy
c836f2f2ac
Replacing setTimeout in auto-lock time limit with chrome alarm (#15931) 2022-09-23 20:39:25 -04:00
Nicolas Ferro
3f801e377d
Ability to buy tokens with Moonpay (#15924)
* Ability to buy tokens with Moonpay

* fix for test cases failing

* updated description for MoonPayChainSettings type

* removed test results
2022-09-23 09:38:40 -07:00
Frederik Bolding
4eb8e50800
[FLASK] snaps-skunkworks@0.21.0 (#15889)
* snaps-skunkworks@0.21.0

* Update policy files

* Regen policies again

* Fix tests

* Simplify selector

* Fix flaky test

* Update iframe execution env

* Move snap install warnings to util

* Add basic copy for snap_getBip32PublicKey

* Update permission icon

* Update E2Es

* Fix lint

* Fix locale strings
2022-09-23 12:39:54 +02:00
Nicolas Ferro
1b563188bf
Ability to buy tokens with Coinbase Pay and Transak (#15551)
Co-authored-by: Ariella Vu <20778143+digiwand@users.noreply.github.com>
Co-authored-by: Brad Decker <git@braddecker.dev>
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2022-09-19 10:00:57 -05:00
Dan J Miller
b802e25a85
Fix sepolia network id (#15847) 2022-09-15 14:24:55 -02:30
ryanml
7b04bf8b47
Adding Sepolia as a default test network (#15787) 2022-09-14 13:26:45 -05:00
Brad Decker
c87980bbfe
migrate network constants to typescript (#15610) 2022-09-14 09:55:31 -05:00
Matthew Epps
dcfe80c255
Add entry point for metalabs dapp into metamask home page (#15407)
Co-authored-by: Dan Miller <danjm.com@gmail.com>
2022-09-13 08:41:58 -05:00
Daniel
34e2faaf49
Replace Rinkeby with Goerli for dev testing (#15781) 2022-09-12 13:11:29 +02:00
gzeon
527fbe0c70
Update Arbitrum symbol (#15747) 2022-09-07 10:20:11 -05:00
VSaric
8fa96ac1a2
Updated Avalanche rpcUrl endpoint (#15720) 2022-09-06 09:12:05 -05:00
Frederik Bolding
7fc418a96d
[FLASK] snaps-skunkworks@0.20.0 (#15706)
* snaps-skunkworks@0.20.0

* Generate LavaMoat policy

* Fix some breaking changes

* Update iframe execution env

* Fix unit tests

* Implement snap_getBip44Entropy

* Regenerate LavaMoat policy

* Prefer ControllerMessenger over direct calls

* Fix not showing warning for BIP44 legacy permission and E2E test

Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com>
2022-08-26 13:48:53 +02:00
Filip Sekulic
365bf11fdd
New network info popup (#13319) 2022-08-23 10:04:07 -05:00
Brad Decker
aac5a45bec
Migrate app constants to typescript (#15611) 2022-08-22 10:42:58 -05:00
John Brennan
1c9764a6a2
Fix onboarding events (#15608) 2022-08-18 16:31:07 -05:00
Maarten Zuidhoorn
a52c6a4908
[FLASK] snaps-skunkworks@0.19.0 (#15619)
* Bump snaps-skunkworks to 0.19.0

* Improve snap_getBip32Entropy UI

* Remove console.log

* Update LavaMoat policy

* Dedupe Yarn lock

* Update LavaMoat policy again

* Fix tests

* Update policies and e2e tests

* Update policy again

* Update iframe-execution-environment

* Dedupe yarn.lock

* Update snapshots

* Fix PR comments

* Add TODO

* Trigger CI
2022-08-18 17:07:34 +02:00
VSaric
6e0f130168
New metrics data for token approval transactions (#15289) 2022-08-18 08:49:50 -05:00
John Brennan
82368e7451
Rename some events (#15543)
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2022-08-16 11:39:23 -05:00
Brad Decker
f008c50bbd
Add initial Typescript Files (#15596) 2022-08-16 10:15:29 -05:00
Daniel
2eb0fe6978
Add more tracking for MetaMask (#15462) 2022-08-11 19:33:33 +02:00
Niranjana Binoy
6e5c2f03bf
Token detection V2 Flag Removal and Re-introducing the use of legacy token list when token detection is OFF (#15138)
* addding the legacy tokenlist, tuning token detection OFF by default, adding new message while importing tokens

updating the controller version and calling detectNewToken on network change

fixing rebase error

Run yarn lavamoat:auto for updating policies

updating lavamoat

Deleted node modules and run again lavamoat auto

fixing rebase issues

updating lavamoat policies

updating lavamoat after rebasing

policies

updating custom token warning and blocking detectedtoken link when tpken detection is off for supported networks

to update the token in fetchTosync

updating the contract map object

Revert build-system lavamoat policy changes

Move token list selection logic from components to getTokenList selector

updating the tokenList

Update lavamoat

Fix error

updating lavamoat

lint fix

fix unit test fail

fix unit test fail

lint fix

fixing rebase locale error

rebase fix

Revert build-system policy changes

temp

addressing review comments

* rebase fix
2022-08-09 22:56:25 -02:30
Brad Decker
c72199a1a6
update prettier (#15360) 2022-07-31 13:26:40 -05:00
Adnan Sahovic
6723608173
Added speed up metrics data for transaction events and properly track speed up type (#15197) 2022-07-28 08:46:20 -05:00
Brad Decker
652d631cda
remove exclusions for mismatched object jsdoc type casing (#15351) 2022-07-27 08:28:05 -05:00
Brad Decker
1db0ee87ec
Update Eslint and deps (#15293) 2022-07-26 13:10:51 -05:00
VSaric
f1ca3e56e7
Modify transaction type and add contract method data to metrics (#15175) 2022-07-22 12:45:04 -05:00
Brad Decker
df646a03eb
Fix Provider Tracking Metrics (#15082) 2022-07-20 08:25:04 -05:00
Filip Sekulic
7d321c48e0
Removed ui related code from shared directory (#15252) 2022-07-19 11:07:13 -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
Alex Donesky
09164dcabb
Bump controllers v30.0.2 (#14906)
* bump @metamask/controllers to v30.0.2 and adapt
2022-07-18 09:43:30 -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
7246058797
Added metrics for adding a new network (#15176)
* Added metrics for adding a new network

* Applied requested changes

* Added missed changes
2022-07-13 11:47:13 -02:30
Makoto Inoue
fdd8646ce8
Support for ENS wildcard and offchain resolution (#14675) 2022-07-12 09:30:31 -05:00
Alex Donesky
4f0115fcdc
Add setApprovalForAll confirmation view (#15010)
* enhance setApprovalForAll confirmation flow

* cleanup

* address feedback
2022-07-11 18:32:55 -05:00
ryanml
7ee492b434
Update Optimism ChainID from Kovan to Goerli (#15119) 2022-07-01 19:55:23 -07:00
Brad Decker
94967072f7
Remove global transaction state from send flow (#14777)
* remove global transaction state from send slice

* fixup new test
2022-07-01 08:58:35 -05:00
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