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

123 Commits

Author SHA1 Message Date
filipsekulic
8cb1f4af2e
Renamed metametrics.new.js to metametrics.js (#14327) 2022-04-01 14:11:12 -05:00
Pieter Tolsma
cb1890d928
Convert knobs and actions to controls/args for CountdownTimer (#14222)
Co-authored-by: Pieter Tolsma <pietertolsma@Pieters-MacBook-Air.local>
2022-03-31 13:31:31 -05:00
George Marshall
4bb2582200
Swaps select quote highlight fix (#14270) 2022-03-31 08:58:09 -05:00
David Walsh
00025afe4c
Dark Mode: Remove unwanted background for price quote (#14278) 2022-03-30 15:42:18 -07:00
David Walsh
9d7f4d2005
Ensure proper color for swaps edit link (#14273) 2022-03-30 14:54:25 -07:00
ryanml
085c9753de
Ensure Metafox follows cursor on Fetching quotes screen (#14261) 2022-03-30 10:54:01 -07:00
BoxedFruits
950de390b3
GasModalPageContainer story: convert knobs and actions to controls / args (#13516) 2022-03-30 08:46:37 -05:00
Daniel
69d7c51c56
Show STX switch for wrapping / unwrapping (#14225) 2022-03-30 10:02:55 +02:00
Jurriaan Den Toonder
1521e63913
Change over FeeCard stories to use controls instead of knobs, update props in stories (#13766)
This PR changes over the deprecated knobs and actions in `fee-card.stories.js` to controls.
I attempted to create a `README.mdx`, but unfortunately the `<ArgsTable of={FeeCard} />` refused to render out any of the documentation comments I added to the `FeeCard.propTypes`, thus that has not been included (and no documentation has been added to the propTypes of FeeCard).

_Please note:_ currently nested arg types are not possible in StoryBook, but discussions are open: https://github.com/storybookjs/storybook/issues/11486. This means that the StoryBook shows `primaryFee`, `primaryMaxFee`, `secondaryFee` and `secondaryMaxFee`, but these are mapped to the 2 `primaryFee` and `secondaryFee` props of the component. This is visible if the developer clicks on the `Show code` button at the docs page in StoryBook.

Signed-off-by: Jurriaan Den Toonder <1493561+Fastjur@users.noreply.github.com>
2022-03-29 16:13:00 -06:00
Daniel
7cb22bd883
metaMetricsEvent -> trackEvent (#14249) 2022-03-29 19:19:40 +02:00
Guillaume Roux
a3ab204d11
Dark Mode: Fix some colors (#14228)
* fix some colors

* fix test and address requested changes

* address requested changes
2022-03-28 10:23:27 -07:00
Guillaume Roux
a7ac83f9d3
Dark Mode: Swap hex colors in ui/pages (#14214)
* swap hex colors in ui/pages

* update snapshots
2022-03-25 15:15:31 -07:00
Guillaume Roux
57818fabbe
Dark Mode: Remove ui colors (#14184) 2022-03-25 10:07:47 -05:00
George Marshall
729e89015f
Dark mode: search icon (#14201) 2022-03-25 15:22:56 +01:00
VSaric
5564176d72
Remove usages of useNewMetricEvent hook (#13955) 2022-03-25 08:21:29 -05:00
George Marshall
fd36eea443
Dark mode: Updating all left over static hex values in scss (#14167) 2022-03-24 19:08:08 +01:00
David Walsh
065d525d58
Dark Mode: Remove --ui-white (#14162) 2022-03-24 15:13:26 +01:00
Daniel
4c16b583c3
Improvements for Smart Transactions / Swaps (#14022)
- Don’t call /estimateGas if a user doesn’t have enough funds
- Hardcode block explorer URLs for Swaps
- Track the "stx_prev_user_opt_in" param
- Add fee estimates tracking for regular txs and STX
- Track estimated_gas and estimated_vs_used_gasRatio for STX
- Only track the "Error Smart Transactions" event once
- Don't overwrite "maxGasLimit" for STX on the View Quote page for better "balance needed" estimations
- Update description for Transak
- Fix styles for the input field on the Build Quote page
- Refactor variables for STX error types and add translation for each STX error type
- Do additional logging for the "current_stx_enabled" param
- Add a close icon for an STX notification, update STX content
2022-03-23 20:28:26 +01:00
George Marshall
386a760285
Dark mode: Updating arrows icon in build quote (#14155) 2022-03-23 12:07:29 -07:00
Guillaume Roux
8683282a6f
Dark Mode: Replace color occurences (#14112) 2022-03-23 16:43:53 +01:00
George Marshall
3d3670e807
Dark mode: Replacing svg image with font awesome icon for main-quote-summary (#14137) 2022-03-23 16:25:28 +01:00
David Walsh
063b9e3b25
Dark Mode: Fix Import Token Styles (#14099) 2022-03-22 11:21:32 -07:00
David Walsh
3f761ecd8c
Remove dead CSS code from Swaps (#14084) 2022-03-21 14:11:11 -07:00
David Walsh
a79d3eb928
Dark Mode: Select Quote Popover (#14054) 2022-03-21 08:33:22 -05:00
Daniel
95f830438a
Add a new fiat onboarding option via MoonPay (#13934) 2022-03-21 10:26:52 +01:00
David Walsh
79d00f72e1
Dark Mode: Update swaps link colors (#14033) 2022-03-18 13:07:07 -07:00
Alex Donesky
e3ea4f2cd0
Fix issue where we show contract address as recipient when calling safe transfer method on erc721 or erc1155 contracts (#13535)
* fix issue where we show contract address as recipient when calling safe transfer method on erc721 or erc1155 contracts

* updates function name getTransactionData -> parseStandardTokenTransactionData, and adds documentation
2022-03-17 13:35:40 -05:00
David Walsh
9373f51e97
Dark Mode: Swaps Colors (#13976) 2022-03-17 13:04:01 -05:00
Mark Stacey
c7fabbff87
Add data-test-id prop to TextField component (#13973)
The `data-test-id` prop has been added to `TextField`. This prop allows
selecting this component more easily from e2e and unit tests. This is
required for a subsequent PR that includes a text field that cannot be
selected for by placeholder or contents or label (any of which would
have been preferable).
2022-03-15 20:42:37 -02:30
Daniel
5aff1863ca
Improve slippage input validation in Swaps (#13914)
* Improve client-side validation for the slippage input

* Improve validation of the slippage input field

* Use Number instead of toNumber
2022-03-14 15:41:03 +01:00
George Marshall
fa4d884a87
Find and replace of all typography colors to design tokens (#13885) 2022-03-09 07:24:53 -08:00
Brad Decker
9cea401022
extract determineTransactionType from tx controller (#13737) 2022-03-07 12:54:36 -06:00
Olusegun Akintayo
6d54897cfb
Fixed these issues in v10.11.0 (#13806)
After landing on Swap, a disclaimer of Smart Transactions appear, and an error on devTools shows the following: “invalid prop ‘type’ of value ‘ul’” supplied to ‘Typography’
    After enabling Smart Transactions, an error on devTools shows the following: “invalid prop ‘smartTransactionsOptInSatus’ of type ‘boolean supplied to ‘SlippageButtons’

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
2022-03-02 19:59:31 +04:00
Daniel
42fd5d19f4
Content and UI updates for the STX modal (#13798)
* Update content and UI for STX modal

* Update the main header image for STX

* Capitalize Smart Transactions in the button label
2022-03-01 19:18:20 +01:00
Guillaume Roux
23e6c073c4
Dark Theme setup and button theming (#13651)
* Add design-tokens and apply colors to button

* swap more colors

* tweak button and add dark theme switch to storybook

* tweak buttons

* fix typo

* remove comments

* add dep to ignored list

* fix linting issue

* fix linting issues

* Updating some styles and removing some deprecated buttons (#13742)

* Updating some styles and removing some deprecated buttons

* Warning button fixes

* Fixing warning text for darkmode

* bump design tokens and update storybook theme strategy

Co-authored-by: George Marshall <george.marshall@consensys.net>
2022-02-25 14:11:22 -08:00
Daniel
6dd141ebfd
Small fixes for Swaps (#13732)
* Fix: Insufficient number of substitutions for key "stxSuccessDescription"

* Only calculate "approvalGas" if the "approvalNeeded" param is truthy in a quote

* "Swap from" has to be set to enable "Review Swap", set a default token for "Swap from"

* Fix: Unable to find value of key "undefined" for locale

* Use array destructuring
2022-02-23 22:10:28 +01:00
fadnesscharlie
3d5da527f9
Added Controls and Action ArgType, took out @storybook/addon-knobs (#13660)
* added controls and took out unused code

* Fix Lint Issues
2022-02-21 08:13:11 -06:00
Daniel
2585f45bde
Add support for Smart Transactions (#12676) 2022-02-18 17:48:38 +01:00
Daniel
120603e6df
Enable Avalanche for Swaps (#13653) 2022-02-18 15:24:47 +01:00
Daniel
cbf8a737dc
Change "Quote X of Y" to "Fetching quote X of Y" (#13663)
* Change "Quote X of Y" to "Fetching quote X of Y"

* Update a test

* Trigger Build
2022-02-17 17:08:53 +01:00
Jyoti Puri
760ed3457d
Removing EIP_1559_V2 feature flag (#13481) 2022-02-03 05:58:28 +05:30
Jyoti Puri
cc1861a34e
Adding metrics events for EIP-1559 V2 flow (#13329) 2022-02-01 23:23:03 +05:30
thickforest
fd46f97e35
Fix className misspelling in awaiting-swap.js 2022-01-27 14:47:25 -06:00
Jyoti Puri
5b5b2cd7df
Fixing warnings in unit test cases (#13349) 2022-01-20 00:04:22 +05:30
Jyoti Puri
88faef7e19
Adding user setting option for EIP-1559 V2 (#13242) 2022-01-12 00:47:56 +05:30
Alex Donesky
4826c8c95e
Feat/collectibles send flow (#13048)
* Add collectibles send flow
2022-01-10 10:23:53 -06:00
Mark Stacey
3732c5f71e
Add JSDoc ESLint rules (#12112)
ESLint rules have been added to enforce our JSDoc conventions. These
rules were introduced by updating `@metamask/eslint-config` to v9.

Some of the rules have been disabled because the effort to fix all lint
errors was too high. It might be easiest to enable these rules one
directory at a time, or one rule at a time.

Most of the changes in this PR were a result of running
`yarn lint:fix`. There were a handful of manual changes that seemed
obvious and simple to make. Anything beyond that and the rule was left
disabled.
2022-01-07 12:27:33 -03:30
Elliot Winkler
af971cd5b6
Remove dupe Prettier config from ESLint config (#13234)
The ESLint config for the extension explicitly includes support for
Prettier. However, this is already being provided by our global ESLint
config (`@metamask/eslint-config`). Therefore there is no need to
include it here. In fact, this is causing weird issues where the `curly`
option is getting overridden somehow. After this change, these syntaxes
are invalid:

``` javascript
if (foo) return;
```

``` javascript
if (foo) return 'bar';
```
2022-01-06 15:56:51 -07:00
David Walsh
10dc686505
Dark Mode Part 1: Switch to Using CSS Variables (#13147) 2022-01-06 11:35:49 -06:00
Jyoti Puri
f5dcd12293
using 1559 V2 for cancel speed up flows (#13019) 2022-01-06 08:17:26 +05:30