1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00
Commit Graph

577 Commits

Author SHA1 Message Date
David Walsh
cce269b632 Lint 2020-11-05 11:09:42 -06:00
David Walsh
8a3dabb230 Use optional chaining for functions 2020-11-05 10:28:24 -06:00
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
Dan J Miller
21ab6fb7b5
Use our local ETH_SWAPS_TOKEN_OBJECT in place of the swaps api ETH 'token', in the swaps token array (#9678) 2020-10-22 12:29:58 -02:30
Dan J Miller
07c03e362e
Get swaps fee from api (#9677)
* Use fee from quote object instead of from fee api

* Remove code related to the metaMaskFeeAmount property in state and the /fee api
2020-10-22 12:28:19 -02:30
David Walsh
cdef338c85 Prevent multiple state changes 2020-10-22 08:08:59 -05:00
David Walsh
6704aab16c Lint 2020-10-21 13:22:00 -05:00
David Walsh
21875d1dd3 Fix for tests 2020-10-21 12:55:03 -05:00
David Walsh
4892a3e0e1 Fix 9649 - Ensure QR codes work properly when adding contact 2020-10-21 11:35:56 -05:00
Mark Stacey
5789bd86c0
Fix sorting Quote Source column of quote sort list (#9658)
Sorting was broken for the "Quote Source" column of the quote sort
list. Attempting to sort by this column would arrange the quotes in a
seemingly random order.

It appears that this was due to this column being programmed to sort by
a property called `liquiditySource`, which does not exist in the quote
data. I'm unsure what the difference between `liquiditySource` and
`quoteSource` was supposed to be; the values in the mocks are all
identical.

All references to `liquiditySource` have been updated to refer to
`quoteSource` instead, and the sorting now works correctly.
2020-10-20 12:14:04 -02:30
David Walsh
fe970a7be8
Merge pull request #9642 from darkwing/9638-swap-overflow-2
Fix 9638 - Prevent excessive overflow from swap dropdowns
2020-10-20 09:16:34 -05:00
Mark Stacey
7f1bbbc9a3
Fix message PropType of ActionableMessage (#9653)
The `message` prop of `ActionableMessage` had a PropType of `string`,
but it was being passed a `node`. This was resulting in a PropType
error in the console on the view quote page.

The PropType has been changed to `node`, and the error is now gone.
2020-10-20 10:36:44 -02:30