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

586 Commits

Author SHA1 Message Date
Mark Stacey
4ef908aeb2
Revert "Remove unnecessary lock page (#9793)" (#9825)
This reverts commit f5265c24ab.

Apparently it wasn't unnecessary after all. The Lock page served a few
different purposes. First, it was used to safeguard the seed phrase, in
case the user was interrupted after setting a password. Otherwise
anyone could open MetaMask and see the seed phrase without verifying
the password. Second, the submit function for the initialization unlock
screen also returned the seed phrase, so that it could be set in React
state for the confirmation step. Third, the submit function was also
responsible for navigating back to the seed phrase reveal page.

Removing the lock page had the effect of causing an infinite render
loop if onboarding was interrupted in the "Create" flow after setting
a password but before seed phrase confirmation. That redirect loop has
now been fixed.
2020-11-09 10:20:24 -03:30
Brad Decker
a49a4a066c
expand transaction constants coverage (#9790)
* expand transaction constants coverage

* touchups

* dont import inside of e2e

* Update app/scripts/controllers/transactions/tx-state-manager.js

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

* Update test/unit/app/controllers/transactions/tx-controller-test.js

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

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-11-07 01:38:12 -06:00
Patryk Łucka
f30d261e69
Add custom hd path option (#9367)
* Add custom hd path option

* Update selectPathHelp locale message

Co-authored-by: Erik Marks <rekmarks@protonmail.com>
2020-11-06 16:17:16 -08:00
Patryk Łucka
128efc5b52
Add sort and search to AddRecipient accounts list (#9257)
* sort and search accounts in AddRecipient component

* Update AddRecipient unit test

Co-authored-by: Erik Marks <rekmarks@protonmail.com>
2020-11-06 15:16:51 -08:00
Patryk Łucka
ee205b893f
Create custom addHexPrefix function (#9306)
* create custom addHexPrefix function

* switch to custom addHexPrefix

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
Co-authored-by: Erik Marks <rekmarks@protonmail.com>
2020-11-06 13:18:00 -08:00
Erik Marks
bff982017b
Fix send header cancel button alignment (#9812) 2020-11-05 15:04:01 -08:00
Erik Marks
efd36adaac
Never disable save button if props chain ID is invalid (#9808) 2020-11-05 14:57:11 -08:00
Mark Stacey
3dbf5dbf65
Fix lint error (#9806)
A lint error was accidentally introduced recently when two PRs changed
the same area of code (#9793 and #9795). They didn't conflict, and the
lint passed for both, but when combined they left an unused variable.
2020-11-05 17:07:19 -03:30
David Walsh
cfbcc12398
Make all UI tabs accessible via keyboard (#9518) 2020-11-05 12:05:41 -06:00
Mark Stacey
f5265c24ab
Remove unnecessary lock page (#9793)
This page appears to serve the sole purpose of locking the extension
and redirecting back to the base route if the page is refreshed during
the onboarding flow. This ineffectual before the vault has been
initialized, and it's a barrier to resuming interrupted onboarding
flows when done after initialization.
2020-11-05 13:04:12 -03:30
Mark Stacey
ad478f8393
Remove unreachable branches from first time flow switch (#9795)
The conditions `isUnlocked` and `!isUnlocked` did account for all
cases, so any branches after that were unreachable.
2020-11-05 12:41:56 -03:30
Mark Stacey
314125e6fd
Remove unused isImportedKeyring prop (#9794)
This prop was being passed to the `CreatePassword` component, but that
component has no prop with this name. In fact, no component in this
entire project does.
2020-11-04 19:56:17 -03:30
Dan J Miller
a0d7c71011
Switch gas price estimation in swaps to metaswap-api /gasPrices (#9599)
Adds swaps-gas-customization-modal and utilize in swaps

Remove swaps specific code from gas-modal-page-container/

Remove slow estimate data from swaps-gas-customization-modal.container

Use average as lower safe price limit in swaps-gas-customization-modal

Lint fix

Fix up unit tests

Update ui/app/ducks/swaps/swaps.js

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

Remove stale properties from gas-modal-page-container.component.js

Replace use of isCustomPrice safe with isCustomSwapsGasPriceSafe, in swaps-gas-customization-modal

Remove use of averageIsSafe in isCustomPriceSafe function

Stop calling resetCustomGasState in swaps

Refactor 'setter' type actions and creators to 'event based', for swaps slice custom gas logic

Replace use of advanced-tab-content.component with advanceGasInputs in swaps gas customization component

Add validation for the gasPrices endpoint

swaps custom gas price should be considered safe if >= to average

Update renderDataSummary unit test

Lint fix

Remove customOnHideOpts for swapsGasCustomizationModal in modal.js

Better handling for swaps gas price loading and failure states

Improve semantics: isCustomSwapsGasPriceSafe renamed to isCustomSwapsGasPriceUnSafe

Mutate state directly in swaps gas slice reducer

Remove unused params

More reliable tracking of speed setting for Gas Fees Changed metrics event

Lint fix

Throw error when fetchSwapsGasPrices response is invalid

add disableSave and customTotalSupplement to swaps-gas-customization container return

Update ui/app/ducks/swaps/swaps.js

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

Improve error handling in fetchMetaSwapsGasPriceEstimates

Remove metricsEvent from swaps-gas-customization-modal context

Base check of gas speed type in swaps-gas-customization-modal on gasEstimateType

Improve naming of variable and functions use to set customPriceIsSafe prop of AdvancedGasInputs in swaps-gas-customization-modal

Simplify sinon spy/stub code in gas-price-button-group-component.test.js

Remove unnecessary getSwapsFallbackGasPrice call in swaps-gas-customization-modal

Remove use of getSwapsTradeTxParams and clean up related gas price logic in swaps

Improve validator of SWAP_GAS_PRICE_VALIDATOR

Ensure default tradeValue
2020-11-04 12:44:08 -03:30
Erik Marks
ad838df3e6
Display decimal chain ID in network form (#9780)
* Display network form chain ID in decimal

* Hide chainId tooltip in view mode

* Display chain ID error message in entered format

* Update locale messages

* Rename on change chain ID validator
2020-11-03 20:10:52 -08:00
Brad Decker
026a06b39d
add shared transaction constants (#9459)
Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com>
2020-11-03 16:57:51 -06:00
David Walsh
5f828b4f41
Make the login screen's Restore and Import links accessible (#9746) 2020-11-03 13:42:47 -06:00
David Walsh
51fc06cf06
Autofocus input, improve accessibility of restore page (#9748) 2020-11-03 12:40:12 -06:00
Brad Decker
2ebf8756a4
[RFC] add prettier to eslint (#8595) 2020-11-02 17:41:28 -06:00
David Walsh
907e8d6a77
Remove border radius from transfer button (#9767) 2020-10-30 13:38:58 -05:00
David Walsh
a74aa45bdd
Use 1px borders on inputs and buttons (#9766) 2020-10-30 13:31:42 -05:00
David Walsh
77dc0ab008
Make swap arrows accessible, make swaps advanced options accessible (#9750) 2020-10-30 09:35:47 -05:00
Erik Marks
ab8083284b
Merge branch 'develop' into standardize-network-settings 2020-10-29 10:02:19 -07:00
Brad Decker
14161e37da
normalize page font styles (#9697) 2020-10-29 11:31:48 -05:00
Erik Marks
59a38a253f Remove unnecessary optional chaining 2020-10-28 23:34:40 -07:00
Erik Marks
2393749809 Simplify routing to fix breakage in popup 2020-10-28 23:34:40 -07:00
Erik Marks
58d19745c9 Add explanatory comment 2020-10-28 23:34:40 -07:00
Erik Marks
47d94489b7 Finish network settings redesign 2020-10-28 23:34:40 -07:00
Erik Marks
c3df1aab8d Style touchups 2020-10-28 23:34:40 -07:00
Erik Marks
64883aecb0 Improve fullscreen network form appearance 2020-10-28 23:34:40 -07:00
Erik Marks
4a219d9a10 Fix network name overflow 2020-10-28 23:34:40 -07:00
Erik Marks
4ad5e027be Fix network list arrow styling 2020-10-28 23:34:40 -07:00
Erik Marks
1373a90e27 Hide network form buttons when form is viewOnly 2020-10-28 23:34:40 -07:00
Erik Marks
8a1820c537 Add networks settings routes 2020-10-28 23:34:40 -07:00
Erik Marks
27118fdd98 Fix popup network form appearance; code style 2020-10-28 23:34:40 -07:00
Erik Marks
5530914776 Standardize appearance of network settings 2020-10-28 23:34:40 -07:00
David Walsh
5b67cf1009
Prevent React warning for custom slippage (#9706) 2020-10-28 08:58:31 -05:00
Dan J Miller
a4f817e171
Include trade.value in calculation of displayed network fees (#9621)
* Ensure that trade.value fees are included in displayed network fees

* Remove unused getTotalEthCost function

* Remove unused getTotalEthCost function

* Update ui/app/pages/swaps/swaps.util.js

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

* Lint fix

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-10-27 16:32:21 -02:30
David Walsh
61e48b4a84
Switch to DIV for swaps dropdown accessibility (#9732) 2020-10-27 12:20:35 -05:00
Brad Decker
7d50357684
remove matomo and route to segment (#9646) 2020-10-26 14:05:57 -05:00
David Walsh
a111702f28
Merge pull request #9702 from darkwing/swaps-keyboard-dropdown
Swaps keyboard dropdown
2020-10-26 11:10:19 -05:00
Dan J Miller
5456d55c88
Update main-quote-summary designs/styles (#9612)
* Update main-quote-summary designs/styles

* Clean up css: use className instead of element types

* Style fixes to symbol elements in main-quote-view

* Use correct source for token iconUrls passed to main-quote-view

* Improve vertical spacing on view-quote screen and with new main-quote-view designs

* Remove unused classes

* Tweak space around large quote amount text in main-quote-summary
2020-10-25 10:53:34 -02:30
David Walsh
f4e5eeca18 Prevent React error for close 2020-10-23 16:08:46 -05:00
David Walsh
14fff6dcf2 Lint 2020-10-23 15:01:50 -05:00
David Walsh
15aba70e74 Clean up events 2020-10-23 14:29:16 -05:00
David Walsh
cdda54155e Make the dropdown widgets for swaps keyboard accessible 2020-10-23 14:19:28 -05:00
David Walsh
f0202f2d2c Provide image sizing so there's no jump when opening the swaps token search 2020-10-23 13:28:38 -05:00
Mark Stacey
400881b1b1
Remove broken Storybook stories (#9690)
These two stories showcased components that used React context and
Redux state that was not made available in the stories themselves. They
both crashed with an error when rendered in Storybook.

Instead of going through a great deal of effort to setup mocks for the
global Redux state and context, they have been removed. They are
perhaps the wrong layer for us to showcase in Storybook. Storybook is
more well suited for individual components that contain just UI logic.
2020-10-23 12:44:45 -02:30
Mark Stacey
209f2afd3d
Fix PropType error on Awaiting Swap page (#9688)
A PropType error was shown in the console when on the Awaiting Swap
page in certain error scenarios. The `symbol` property was sometimes
not set if `destinationTokenInfo` was missing.

The `symbol` prop has been removed, as the `AwaitingSwap` component
already selected the `fetchParams`, and the `destinationTokenInfo`
object within. The prop was effectively a duplicate.
2020-10-23 11:41:10 -02:30
David Walsh
e46c063fed
Merge pull request #9667 from darkwing/9649-qr-contact
Fix 9649 - Ensure QR codes work properly when adding contact
2020-10-22 11:42:31 -05:00
David Walsh
9c25775b69 Prevent conflicting values when network change and QR code in same render 2020-10-22 10:08:54 -05:00