1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-23 03:36:18 +02:00
Commit Graph

736 Commits

Author SHA1 Message Date
ryanml
2f8908804a
Handling infura blockage (#10883)
* Handling infura blockage

* Adding blockage home notification

* Updating copy, adding temporary notification dismissal

* Addressing review feedback

* Using eth_blockNumber method to check Infura availability

* Handling network changes in availability check
2021-04-15 10:41:40 -07: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
Daniel
a07780ab61
Change caching for Swaps APIs from 1 hour to 5 minutes (#10871)
* Change caching for the /tokens API from 1 hour to 5 minutes

* Use 5 minutes caching for /topAssets and /aggregatorMetadata APIs as well
2021-04-09 22:29:52 -02:30
Thomas Huang
253efc6f8c
Jest config (#10855)
* Setup jest config

* Adjust test for jest.

* Adjust lint config

* Omit swaps ui folder for unit testing

* Omit swaps from test:unit:lax

* Add jest.config.js to script files

* Restore mocks rather than clearing them.

* Update jest config and adjust lint to include subdirs

* Convert view-quote-price-difference test to jest

* Add jest ci and ci coverage scripts. Add jest unit test to general test command

* Add test coverage to ci

* Use --ignore flag

* Fixup

* Add @metamask/eslint-config-jest

* Update .eslintrc.js

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

* Adds jest-coverage/

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2021-04-09 10:20:32 -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
Daniel
a814f8ee75
Increase default slippage from 2% to 3%, show Advanced Options by default (#10842)
* Increase default slippage from 2% to 3%, show Advanced Options by default

* Disable opening / closing of Advanced Options on the Swap page

* Pre-select previously used slippage value when going back to the Swap page

* Fix lint issues

* Use a callback for setting up an initial customValue
2021-04-08 16:28:19 -02:30
Daniel
135f0bb4f0
Add validation for the fee property from the /trades API response (#10836) 2021-04-06 21:49:55 -02:30
David Walsh
b2f6aa9f65
Ensure correct primary currency image is displayed on home screen and token list (#10777) 2021-04-01 17:57:00 -05:00
Brad Decker
1e44c34e1e
upgrade eslint deps (#10789) 2021-04-01 13:44:42 -05:00
Dan J Miller
f7a328a9d9
Ensure that priceSlippage fiat amounts are always shown in view-quote.js (#10762) 2021-03-30 12:55:29 -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
Dan J Miller
76f4e93eb2
Ensure that the correct default currency symbols are used for fees on the view quote screen (#10753) 2021-03-29 17:00:06 -02:30
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
Dan J Miller
cc19d250e8
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
2021-03-28 10:48:44 -02:30
David Walsh
d4842b089e
Fix 10562 - Hide the suggested token pane when not on Mainnet or test network (#10702) 2021-03-25 14:25:22 -05:00
David Walsh
c14919c60f
Fix 10706 - Prevent autocomplete from add token input (#10700) 2021-03-24 19:24:51 -05:00
Brad Decker
a16841f6bb
rule out empty string for symbol (#10712) 2021-03-24 17:04:15 -05:00
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
Mark Stacey
5bed62b1b3
Add MetaMask to list of BIP44 HD path examples (#10703)
The "BIP44 Standard" HD path option in the Ledger connect flow listed
only Trezor as an example. It seemed appropriate to include MetaMask as
well, since we use the same path. This helps users who have imported
their MetaMask seed phrase onto a Ledger device to discover this
option.
2021-03-24 12:45:28 -02:30
Brad Decker
255586aea1
resolve issue with missing template error (#10692)
* resolve issue with missing template error

* also apply filtering to confirmation page

* rename variable
2021-03-23 16:12:32 -05:00
ryanml
fc8ffc134d
Adding default properties to NetworkForm (#10682)
Fixes MetaMask/metamask-extension#10681
2021-03-22 09:57:34 -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
David Walsh
da90674f59
Allow TextField to receive min and max attributes (#10656) 2021-03-16 11:24:56 -05:00
Dan J Miller
60514c12b0
Fix: ETH 'token' now only appears once in the swaps to and from dropdowns. (#10650) 2021-03-15 14:21:43 -02:30
David Walsh
3e6b2e7f0a
Ensure swaps detail height doesn't create jump in vertical height (#10644) 2021-03-15 11:30:01 -05:00
David Walsh
9ae82046f0
Position the 3dot menu in the same spot on asset screen and home screen (#10642) 2021-03-15 09:56:26 -05:00
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
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
Mark Stacey
669ab187a1
add trezor HD path for ledger wallets (#10616)
Co-authored-by: Barry Gitarts <bgitarts@gmail.com>
2021-03-10 14:56:48 -03:30
Brad Decker
aa37e30c08
use etherscan-link for account-link (#10590) 2021-03-10 11:21:52 -06:00
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
21868e08e6
Move the METASWAP_API_HOST constant to the swaps constant file (#10612) 2021-03-09 12:36:44 -03:30
Niranjana Binoy
85181aaff4
adding condition check to verify token data is loaded before rendering approve screen (#10606) 2021-03-08 16:50:37 -05:00
ryanml
45c076e232
Adding warnings for excessive custom gas input (#10582)
Fixes MetaMask/metamask-extension#9811
2021-03-05 10:32:09 -07:00
Dan J Miller
b441dcec6a
Convert useSwapsEthToken hook to a selector (#10568)
* Convert useSwapsEthToken hook to a selector

* Code cleanup
2021-03-04 13:46:01 -03:30
ryanml
a8b1653566
Updating references to MetaMask support (#10563)
* Updating references to support email

Fixes MetaMask/metamask-extension#10188

* Removing UniqueImage component

* Removing unused UniqueImage locales
2021-03-03 10:15:24 -07:00
Dan J Miller
325215fb5f
Remove dead code related to the selectedFromToken variable in swaps/index.js (#10570) 2021-03-03 12:16:19 -03:30
ryanml
3c6cdef074
Adding a warning when sending a token to its own contract address (#10546)
Fixes MetaMask/metamask-extension#9437
2021-03-02 17:28:12 -07:00
Brad Decker
eef92d0d5a
handle undefined network (#10560) 2021-03-02 18:20:37 -06:00
Mark Stacey
1ed75b45f7
Remove unused hasHexData prop (#10529)
This prop was never passed in, nor can I see any reason for it to exist
in the first place.
2021-03-02 12:13:53 -03:30
Dan J Miller
46ecf70741
Update swaps failure copy to help users get support (#10525) 2021-03-01 13:02:02 -03:30
Brad Decker
7532e7ce3f
fix links in add ethereum chain (#10536) 2021-03-01 09:36:39 -06:00
David Walsh
8013e85c20
Accommodate for 0 sources verifying swap token (#10521) 2021-03-01 09:20:38 -06:00
Brad Decker
616b71271a
add chainId to all new transaction metadata (#10528) 2021-03-01 09:15:42 -06:00