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

3975 Commits

Author SHA1 Message Date
David Walsh
fc30fd44d7
Fix 10036 - Prevent odd localStorage migration error in Firefox (#10884) 2021-04-14 09:24:17 -05:00
Daniel
e7d7d24d83
Reduce calls of the /featureFlag API (#10859)
* Remove periodic calls to the /featureFlag API

* Always show the Swap button on the main page

* Check if the Swaps feature is enabled, show loading animation while waiting

* Reuse an existing useEffect call

* Use ‘isFeatureFlagLoaded’ in React’s state, resolve lint issues

* Add a watch mode for Jest testing

* Add unit tests for Swaps: fetchSwapsLiveness, add /ducks/swaps into Jest testing

* Remove Swaps Jest tests from Mocha’s ESLint rules

* Ignore Swaps Jest tests while running Mocha, update paths

* Increase test coverage to the current max

* Fix ESLint issues for Swaps

* Enable the Swaps feature by default and after state reset, remove loading screen before seeing Swaps

* Update Jest config, fix tests

* Update Jest coverage threshold to the current maximum

* Update ESLint rule in jest.config.js

* Disable the “Review Swap” button if the feature flag hasn’t loaded yet

* Update jest threshold
2021-04-14 04:46:27 -02:30
ryanml
9e918b6026
Adding recovery phrase video to onboarding process (#10717)
* Adding recovery phrase video to onboarding process

Adding english subtitles

* Support textAlign in Box, converting sidebar to Box
2021-04-13 15:29:44 -07:00
Erik Marks
e18deda0da
@metamask/eslint-config*@6.0.0 (#10858)
* @metamask/eslint-config*@6.0.0

* Minor eslintrc reorg
2021-04-08 14:34:55 -07:00
Mark Stacey
2d49efd3d6 Merge remote-tracking branch 'origin/develop' into sync-master
* origin/develop: (82 commits)
  Add links to release headers (#10808)
  Removing unnecessary params from withFixtures function call. (#10831)
  Fix _getPermittedAccounts type safety (#10819)
  Refactoring send-edit.spec.js to use fixtures (#10792)
  Refactoring address-book.spec.js to use fixtures (#10804)
  Update the changelog when creating an RC (#10795)
  Update changelog headers and fix dates (#10805)
  Add support for locators into driver abstraction (#10802)
  remove node-sass dependency (#10797)
  Add release header when updating changelog (#10794)
  Ensure correct primary currency image is displayed on home screen and token list (#10777)
  upgrade eslint deps (#10789)
  only applies rules to the appropriate files (#10788)
  Set the BSC_CONTRACT_ADDRESS to lowercase (#10800)
  Prevent duplicate changelog entries (#10786)
  Add changelog entries under release candidate header (#10784)
  Remove script for creating master sync PR (#10791)
  Remove date from changelog release header (#10790)
  Remove useless negation (#10787)
  Refactoring ethereum-on.spec.js to use fixtures (#10778)
  ...
2021-04-06 16:54:44 -02:30
Erik Marks
e142bf0c5e
Fix _getPermittedAccounts type safety (#10819) 2021-04-05 11:32:46 -07:00
MetaMask Bot
14b5c389ed
Version v9.3.0 RC (#10739)
* 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>
2021-04-02 17:00:57 -02:30
kumavis
952adbce44
Build - refactor background process to use html (#10769)
* build - declare background as html

* build - fill in empty file when a missing file is expected

* lint - fix

* Update development/build/manifest.js

Co-authored-by: Mark Stacey <markjstacey@gmail.com>

* Update development/build/manifest.js

Co-authored-by: Mark Stacey <markjstacey@gmail.com>

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2021-03-31 11:12:28 +08:00
Dan J Miller
2dadf4374a
Use network specific swaps contract address when checking swap contract token approval (#10774) 2021-03-30 16:25:14 -02:30
Dan J Miller
be0b8a11d8
Ensure that the approval fee in the swaps custom gas modal is in network specific currency (#10763) 2021-03-30 12:53:41 -02:30
Brad Decker
4080ed63a4
Refactor Tx State Manager (#10672)
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2021-03-30 09:54:05 -05:00
David Walsh
29cc31afe8
Fix 10517 - Prevent tokens without addresses from being added to token list (#10593) 2021-03-29 16:05:36 -05:00
Dan J Miller
d8fd4b8271
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
2021-03-29 10:24:27 -02:30
Mark Stacey
68d3756528 Merge remote-tracking branch 'origin/develop' into sync-master
* origin/develop: (45 commits)
  eth-block-tracker@5.0.1 (#10737)
  Allow 11 characters in symbol for RPC (#10670)
  security - update SES lockdown (#10663)
  build - refactor build system for easier configuration (#10718)
  ci - cache deps before patch-package (#10735)
  Additional swaps network support (#10721)
  Update @metamask/controllers to v6.2.1 (#10701)
  Fix 10562 - Hide the suggested token pane when not on Mainnet or test network (#10702)
  Fix mismatchedChain typo in custom network approval screen (#10723)
  Fix 10706 - Prevent autocomplete from add token input (#10700)
  fix: remove unused `metamask.rpcUrl` from redux state + fix tests to reflect that (#10714)
  rule out empty string for symbol (#10712)
  Removing hard references to 12 word seed phrases in copy (#10704)
  Add MetaMask to list of BIP44 HD path examples (#10703)
  resolve issue with missing template error (#10692)
  Delete setupFetchDebugging.js (#10636)
  Excluding sourcemaps comment in production builds (#10695)
  deps - remove "remotedev-server" (#10687)
  Adding default properties to NetworkForm (#10682)
  make migration more safe (#10689)
  ...
2021-03-26 18:39:19 -02:30
Erik Marks
6d1add7afe
eth-block-tracker@5.0.1 (#10737) 2021-03-26 10:03:44 -07:00
Grant Bakker
94fc420584
Allow 11 characters in symbol for RPC (#10670)
* Add error in RPC for zero length symbols

* Increase RPC symbol length allowed to 11

* Add RPC tests for new symbol length checks
2021-03-26 10:40:17 -02:30
Etienne Dusseault
8fc2c3272a
security - update SES lockdown (#10663)
* update ses

* build - reference ses directly

* deps - unify regenerator-runtime versions on 0.13.7

* patches - apply regenerator-runtime ses compat patch\nhttps://github.com/facebook/regenerator/pull/411

* patches - patch regenerator-runtime for latest ses fix

* reduc patch, new lockdown severe override taming

* updated redux patch

* update redux patch for production

* ignore lockdown in lint

* deps - bump patch-package just in case

* trailing comma

* remove ses as dep

* fix path for frozen promise

* remove js extension in lockdown require

* Revert "ignore lockdown in lint"

This reverts commit 8cefdc94dd25d7781bb09eed8af36441397676da.

* Revert "build - reference ses directly"

This reverts commit 30371a377dcdd781c1bf9abe55e9c8ae34da26b5.

* deps - update ses

* Revert "fix path for frozen promise"

This reverts commit 966e4c60921a25befe8ca8dea58313cc25852f72.

Co-authored-by: kumavis <aaron@kumavis.me>
2021-03-26 12:27:25 +08:00
Dan J Miller
cc55a981d4
Additional swaps network support (#10721)
* Add swaps support for bnc chain

* Use single default token address in shared/constants/swaps
2021-03-25 18:22:37 -02:30
Dan J Miller
9573aa7515
Update @metamask/controllers to v6.2.1 (#10701) 2021-03-25 17:37:52 -02:30
David Walsh
7afd3156e0
Fix mismatchedChain typo in custom network approval screen (#10723) 2021-03-25 13:26:55 -05:00
MetaMask Bot
5ea02142b5 Version v9.2.1 2021-03-25 15:49:31 -02:30
Niranjana Binoy
04f92a5f14 Setting balance to 0x0 when the original value is undefined (#10634) 2021-03-25 15:49:31 -02:30
ryanml
1cfa58287c
Removing hard references to 12 word seed phrases in copy (#10704)
Adding translation entry for "Wallet Seed"

Fixed label padding issue by adding missing CSS rule
2021-03-24 10:55:03 -07:00
kumavis
bfdc1e68f5
Delete setupFetchDebugging.js (#10636)
* Delete setupFetchDebugging.js

* remove fetch-debugging (now handled corrently by sentry)
2021-03-23 18:05:49 +08:00
Brad Decker
1b4504e233
make migration more safe (#10689) 2021-03-22 10:21:52 -05:00
Brad Decker
a81629e104
refactor incoming tx controller (#10639) 2021-03-19 16:54:30 -05:00
ryanml
530e8c132f
Fixing incorrectly typed token decimal attribute (#10666) 2021-03-19 10:17:39 -07:00
gitpurva
fc999f948b
Change 'Send ETH' title to 'Send' (#10651) 2021-03-19 14:42:11 -02:30
Shane
b50fe3184a
fix: replace dnode background with JSON-RPC (#10627)
fixes #10090
2021-03-18 11:23:46 -07:00
Dan J Miller
480512d14f
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
2021-03-18 07:50:06 -02:30
Brad Decker
5a233e4634
colocate tests in flat structure (#10655) 2021-03-16 16:00:08 -05:00
Mark Stacey
9ce7b31719 Merge remote-tracking branch 'origin/develop' into sync-master
* origin/develop:
  Position the 3dot menu in the same spot on asset screen and home screen (#10642)
  Move swaps constants to the shared constants directory (#10614)
  prefer chainId over networkId in most cases (#10594)
  no more node:console (#10640)
  fix: speedup cancellation (#10579)
  Setting balance to 0x0 when the original value is undefined (#10634)
  Hide zero balance tokens at useTokenTracker layer (#10630)
  Removing double click bug from delete custom network modal (#10628)
  remove transactionCategory in favor of more types (#10615)
  Ensure permission log will only store JSON-able data (#10524)
  Replace logic for eth swap token in fetchQuotesAndSetQuoteState with getSwapsEthToken call (#10624)
  add trezor HD path for ledger wallets (#10616)
2021-03-15 13:20:43 -02:30
Dan J Miller
153bbc6053
Move swaps constants to the shared constants directory (#10614) 2021-03-15 10:51:35 -02:30
Brad Decker
3d4dfc74a8
prefer chainId over networkId in most cases (#10594) 2021-03-12 16:23:26 -06:00
Shane
b21cc5660f
fix: speedup cancellation (#10579)
fixes #7305
2021-03-12 11:26:07 -08:00
Niranjana Binoy
84b1379b40
Setting balance to 0x0 when the original value is undefined (#10634) 2021-03-12 10:20:33 -05:00
Brad Decker
2ed5bafa11
remove transactionCategory in favor of more types (#10615)
* remove transactionCategory in favor of more types

* remove reference to STANDARD in stubs
2021-03-10 14:16:44 -06:00
Erik Marks
a29fc51838
Ensure permission log will only store JSON-able data (#10524) 2021-03-10 11:50:06 -08:00
MetaMask Bot
2c12f19442 Version v9.2.0 2021-03-10 15:37:18 -03:30
Brad Decker
38fe75b7d9
prefer chainId when building block explorer urls (#10587) 2021-03-09 15:37:19 -06:00
David Walsh
92680cf56f
Add support for multiple Ledger & Trezor hardware accounts (#10505) 2021-03-09 14:39:16 -06:00
David Walsh
aeffe176b3
Hide zero balance tokens with preference (#10486) 2021-03-09 13:35:55 -06:00
Dan J Miller
c86ceacfd9
Standard reference to ETH_SWAPS_TOKEN_ADDRESS via ETH_SWAPS_TOKEN_OBJECT.address (#10613) 2021-03-09 12:29:35 -03:30
Brad Decker
9f11fadd95
remove proper noun Ethereum from all locales for onlyAddTrustedNetworks (#10598) 2021-03-08 12:28:06 -06:00
ryanml
45c076e232
Adding warnings for excessive custom gas input (#10582)
Fixes MetaMask/metamask-extension#9811
2021-03-05 10:32:09 -07:00
Mark Stacey
79a7199a2f
Fix mobile sync of ERC20 tokens (#10591)
In #10510 we changed how tokens are stored, keying them by `chainId`
rather than network type. However we didn't update our mobile sync
function to account for this, which ended up breaking the filtering
logic used to prepare the data that is synced.

Specifically, custom tokens added by users are filtered out to just
those that are confirmed to be ERC20 tokens in our built-in list of
tokens. This filters out unrecognized tokens and NFTs.

The filtering logic has been restored to the pre-#10510 behaviour.
2021-03-04 18:43:15 -03:30
Mark Stacey
40ffaa7265
Remove unused localized message (#10589)
This message was accidentally added in #10126.
2021-03-04 16:52:45 -03:30
matteopey
91ffb80606
Update italian translation (#10126)
* Update italian translation

* Update translation after review
2021-03-04 14:13:18 -03:30
Mark Stacey
6c72b55b11 Merge remote-tracking branch 'origin/develop' into sync-master
* origin/develop:
  Updating references to MetaMask support (#10563)
  Remove dead code related to the selectedFromToken variable in swaps/index.js (#10570)
  make lavamoat optional for dev mode (#10538)
  Adding a warning when sending a token to its own contract address (#10546)
  handle undefined network (#10560)
  cache balances by chain id (#10545)
  Fix/handle safe low undefined (#10561)
  Remove unused `hasHexData` prop (#10529)
  Resolving pull-ws to v3.3.2 (#10543)
  Sync `master` with `develop` (#10540)
2021-03-03 22:21:57 -03:30
MetaMask Bot
9d97dcb22e Version v9.1.1 2021-03-03 19:07:29 +00:00