* Replace logic for eth swap token in fetchQuotesAndSetQuoteState with getSwapsEthToken call (#10624)
* Move swaps constants to the shared constants directory (#10614)
* Fix: ETH 'token' now only appears once in the swaps to and from dropdowns. (#10650)
* Swaps support for local testnet (#10658)
* Swaps support for local testnet
* Create util method for comparison of token addresses/symbols to default swaps token
* Get chainId from txMeta in _trackSwapsMetrics of transaction controller
* Add comment to document purpose of getTransactionGroupRecipientAddressFilter
* Use isSwapsDefaultTokenSymbol in place of repeated defaultTokenSymbol comparisons in build-quote.js
* Additional swaps network support (#10721)
* Add swaps support for bnc chain
* Use single default token address in shared/constants/swaps
* Ensure swaps gas prices are fetched from the correct chain specific endpoint (#10744)
* Ensure swaps gas prices are fetched from the correct chain specific endpoint
* Just rely on fetchWithCache to cache swaps gas prices, instead of directly using storage in getSwapsPriceEstimatesLastRetrieved
* Empty commit
* update @metamask/etherscan-link to v2.0.0 (#10747)
* Use correct block explorer name and link in swaps when on custom network (#10743)
* Use correct block explorer name and link in swaps when on custom network.
* Fix up custom etherscan link code in build-quote.js
* Use blockExplorerUrl hostname instead of 'blockExplorerBaseUrl'
* Use correct etherscan-link method for token links in build-quote
* Create correct token link in build-quote for mainnet AND custom networks
* Block explorer url improvements in awaiting-swap.js and build-quote.js
* Use swapVerifyTokenExplanation message with substitutable block explorer for all applicable locales
* Ensure that block explorer links are not shown in awaiting-swap if no url is available
* Ensure that the correct default currency symbols are used for fees on the view quote screen (#10753)
* Updating y18n and netmask to resolve dependency issues (#10765)
netmask@1.0.6 -> 2.0.1, y18n@3.2.1 -> 3.2.2, y18n@4.0.0 -> 4.0.1
* Ensure that priceSlippage fiat amounts are always shown in view-quote.js (#10762)
* Ensure that the approval fee in the swaps custom gas modal is in network specific currency (#10763)
* Use network specific swaps contract address when checking swap contract token approval (#10774)
* Set the BSC_CONTRACT_ADDRESS to lowercase (#10800)
* Ensure correct primary currency image is displayed on home screen and token list (#10777)
* [skip e2e] Update changelog for v9.3.0 (#10740)
* Version v9.3.0
* [skip e2e] Update changelog for v9.3.0 (#10803)
Co-authored-by: Dan J Miller <danjm.com@gmail.com>
Co-authored-by: ryanml <ryanlanese@gmail.com>
Co-authored-by: David Walsh <davidwalsh83@gmail.com>
Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
* origin/develop: (29 commits)
Reset swaps routeState in navigateBackToBuildQuote (#10166)
Fix decrypt message confirmation UI crash (#10252)
Fix site metadata JSON-RPC handler (#10243)
Fix design system error constants (#10246)
Remove unused environment variables (#10234)
Update `yarn.lock` (#10241)
Update postMessage structure for TrezorConnect 8 (#10192)
Increase minimum Firefox version to v68 (#10195)
Bump socket.io from 2.2.0 to 2.4.1 (#10232)
Update `@reduxjs/toolkit` from v1.3.2 to v1.5.0 (#10228)
eth-rpc-errors@4.0.2 (#10226)
Add MAX_SAFE_CHAIN_ID and refactor chain ID validation (#10224)
add chip component (#10199)
add new typography component (#10197)
@metamask/inpage-provider@8.0.3 (#10219)
Add NETWORK_TYPE_RPC constant (#10203)
Further improve organization of constants (#10200)
add includePaths to sass-loader in storybook (#10213)
Disable the swaps submit button after the first time it is clicked (#10162)
Remove default to 18 decimals in quotesToRenderableData method (#10212)
...
Firefox v68 is the _previous_ Extended Support Release. We are
increasing this because our current minimum version doesn't support
async iterators, so some of our dependencies cause the extension to
crash.
Our metrics show that usage of Firefox versions older than this is
quite low (under 0.7% of Firefox users in the past month). These older
versions are also _very behind_ on security updates. Using the Extended
Support Release also makes it easier for us to test the minimum
version, and ensure our extension remains compatible with it.
Relates to #6805
* origin/develop: (66 commits)
Disable swaps based on chainId, instead of network id (#10155)
improve handling of last selected provider (#10093)
Add links to Community Forum to README (#10152)
@metamask/contract-metadata@1.21.0 (#10142)
Prevent malformed next nonce warning (#10143)
add module resolution for node-analytics/axios (#10139)
Ensure that gas for swap tx submitted at same time as approval is in hex (#10135)
Fix useTransactionDisplayData unit tests (#10134)
Fix network settings Kovan block explorer link (#10117)
Use destructured signal (#10115)
throw a new wrapped error instead of default one from segment (#10118)
@metamask/contract-metadata@1.20.0 (#10116)
Use late-bound noop function when disabling console (#10110)
Bump @metamask/contract-metadata from 1.19.0 to 1.20.0 (#10104)
Remove unnecessary swaps footer space when in dropdown mode (#10100)
Tighten up loading indication logic (#10103)
Skip reporting of successive persistence failures (#10099)
Update `@metamask/controllers` to v5.1.0 (#10096)
@metamask/obs-store@5.0.0 (#10092)
set last provider when switching to a customRPC (#10084)
...
* origin/develop: (60 commits)
Ensure that gas for swap tx submitted at same time as approval is in hex (#10135)
Fix useTransactionDisplayData unit tests (#10134)
Fix network settings Kovan block explorer link (#10117)
Use destructured signal (#10115)
throw a new wrapped error instead of default one from segment (#10118)
@metamask/contract-metadata@1.20.0 (#10116)
Use late-bound noop function when disabling console (#10110)
Bump @metamask/contract-metadata from 1.19.0 to 1.20.0 (#10104)
Remove unnecessary swaps footer space when in dropdown mode (#10100)
Tighten up loading indication logic (#10103)
Skip reporting of successive persistence failures (#10099)
Update `@metamask/controllers` to v5.1.0 (#10096)
@metamask/obs-store@5.0.0 (#10092)
set last provider when switching to a customRPC (#10084)
Fetch swap quote refresh time from API (#10069)
Fix `fetch-with-cache` handling of interwoven requests (#10079)
Fix 9874 - Improve gas maximum estimation (#10043)
Add eth_getProof to safe methods (#10070)
fix metametrics option tracking (#10071)
Disable console in contentscript (#10040)
...
* origin/develop: (46 commits)
Fetch swap quote refresh time from API (#10069)
Fix `fetch-with-cache` handling of interwoven requests (#10079)
Fix 9874 - Improve gas maximum estimation (#10043)
Add eth_getProof to safe methods (#10070)
fix metametrics option tracking (#10071)
Disable console in contentscript (#10040)
Use Boolean for filters (#10066)
Add approval controller (#9401)
Cache dependencies (#10065)
Bump ini from 1.3.5 to 1.3.7 (#10064)
Add HTML coverage report to MetaMask bot comment (#10061)
Remove coveralls (#10063)
Prevent metaMaskFee prop error in FeeCard (#10047)
Display boolean values when signing typed data (#10048)
Use CircleCI executors to simplify CI config (#10055)
Use `.zip` for Firefox e2e tests (#10056)
Update `selenium-webdriver` and `geckodriver` (#10057)
Update Firefox version used on CI for e2e tests (#10058)
Add web3 shim usage notification (#10039)
Refactor home notification (#10046)
...
* Maintain console logging in dev mode
Co-authored-by: kumavis <aaron@kumavis.me>
Co-authored-by: Erik Marks <rekmarks@protonmail.com>
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
* Maintain console logging in dev mode
Co-authored-by: kumavis <aaron@kumavis.me>
Co-authored-by: Erik Marks <rekmarks@protonmail.com>
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
The Chrome minimum version has been increased from v58 to v63. We found
that we had very few users on versions below v63, and v62 is
incompatible with our SES lockdown dependency.
This also makes us compatible with Object rest/spread syntax, so we
might not have to transpile that anymore. I'll revisit that separately.
When you load an extension `.zip` file in Firefox, it fails to load
scripts with the `.cjs` file extension. However, it works if you load
the extension via the `manifest.json` file instead.
After renaming the `lockdown.cjs` file to `lockdown.js`, it works in
Firefox in all cases, regardless whether it's loaded by manifest or by
`.zip`.
* Freezeglobals: remove Promise freezing, add lockdown
* background & UI: temp disable sentry
* add loose-envify, dedupe symbol-observable
* use loose envify
* add symbol-observable patch
* run freezeGlobals after sentry init
* use require instead of import
* add lockdown to contentscript
* add error code in message
* try increasing node env heap size to 2048
* change back circe CI option
* make freezeGlobals an exported function
* make freezeGlobals an exported function
* use freezeIntrinsics
* pass down env to child process
* fix unknown module
* fix tests
* change back to 2048
* fix import error
* attempt to fix memory error
* fix lint
* fix lint
* fix mem gain
* use lockdown in phishing detect
* fix lint
* move sentry init into freezeIntrinsics to run lockdown before other imports
* lint fix
* custom lockdown modules per context
* lint fix
* fix global test
* remove run in child process
* remove lavamoat-core, use ses, require lockdown directly
* revert childprocess
* patch package postinstall
* revert back child process
* add postinstall to ci
* revert node max space size to 1024
* put back loose-envify
* Disable sentry to see if e2e tetss pass
* use runLockdown, add as script in manifest
* remove global and require from runlockdown
* add more memory to tests
* upgrade resource class for prep-build & prep-build-test
* fix lint
* lint fix
* upgrade remote-redux-devtools
* skillfully re-add sentry
* lintfix
* fix lint
* put back beep
* remove envify, add loose-envify and patch-package in dev deps
* Replace patch with Yarn resolution (#9923)
Instead of patching `symbol-observable`, this ensures that all
versions of `symbol-observable` are resolved to the given range, even
if it contradicts the requested range.
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
The `externally_connectable` property of the extension manifest is not
recognized by Firefox. It has been moved from the base manifest to the
Chrome manifest, so that we no longer get a warning about this property
on Firefox.
We would like to eventually remove it from the Chrome manifest as well,
but we'll wait until we can batch it with other permission changes so
that it doesn't unnecessarily re-prompt the user (see #9804)
JSON files are now sorted by key with `prettier`, using the plugin
`prettier-plugin-sort-json`. This does not affect `package.json`
because `prettier` uses a special parser for that file, as it has
a more restrictive format than JSON.
Instead of using `eslint-plugin-json` for linting JSON files,
`prettier` is now used. `prettier` is capable of detecting and
correcting more problems than `eslint-plugin-json` can, such as
indentation.
All JSON files have been run through `prettier`. The changes are all
superficial.