1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 11:22:43 +02:00
metamask-extension/shared/constants
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
..
alarms.js Replace setInterval with chrome alarms for MetaMetrics FinalizeEventFragment (#16003) 2022-10-04 13:03:50 -04:00
alerts.js @metamask/eslint config@5.0.0 (#10358) 2021-02-04 10:15:23 -08:00
app.ts MV3: Update service worker restart logic and keep-alive logic for dapp support (#16075) 2022-11-15 00:18:08 +07:00
gas.js remove exclusions for mismatched object jsdoc type casing (#15351) 2022-07-27 08:28:05 -05:00
hardware-wallets.js Hardware wallet copy updates, referral and tutorial buttons (#14738) 2022-10-04 10:16:57 -05:00
labels.js Fixing address truncation papercuts (#12330) 2021-10-13 12:54:48 -05:00
metametrics.js Remove 3box feature and delete ThreeBoxController (#14571) 2022-10-31 13:50:50 -02:30
network.ts Enable new networks for Swaps (#16396) 2022-11-08 19:14:17 +01:00
permissions.test.js [FLASK] snaps-skunkworks@0.22.0 (#16069) 2022-10-07 10:02:35 +02:00
permissions.ts [FLASK] Add snap cronjobs (#16239) 2022-11-09 13:18:47 +01:00
phishing.js Bump controllers v30.0.2 (#14906) 2022-07-18 09:43:30 -05:00
smartTransactions.js Swaps / STX improvements (#14622) 2022-05-09 18:48:14 +02:00
swaps.js Enable new networks for Swaps (#16396) 2022-11-08 19:14:17 +01:00
time.ts Add initial Typescript Files (#15596) 2022-08-16 10:15:29 -05:00
tokens.js New network info popup (#13319) 2022-08-23 10:04:07 -05:00
transaction.js New metrics data for token approval transactions (#15289) 2022-08-18 08:49:50 -05:00