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

26 Commits

Author SHA1 Message Date
filipsekulic
8cb1f4af2e
Renamed metametrics.new.js to metametrics.js (#14327) 2022-04-01 14:11:12 -05:00
Daniel
69d7c51c56
Show STX switch for wrapping / unwrapping (#14225) 2022-03-30 10:02:55 +02:00
VSaric
5564176d72
Remove usages of useNewMetricEvent hook (#13955) 2022-03-25 08:21:29 -05: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
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
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
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
Daniel
2585f45bde
Add support for Smart Transactions (#12676) 2022-02-18 17:48:38 +01:00
Matthew Epps
7a92e22111
Swaps optimizations (#12842)
* Trigger Build

* Trigger Build

* Move swaps index variables to redux

* all optimizations so far

* Add better equality checks for selectors in swaps index and build quote

* Clean up PR, remove extra code and logs

* Clean up lavamoat file

* Fixes for optimizations

* Update tests and test snapshots

* Remove unnecessary tests

* Remove unnecessary console log

* Trigger Build

* Trigger Build

* Add delay to account for remote call made by trezor keyring

Co-authored-by: Dan Miller <danjm.com@gmail.com>
2021-12-01 12:55:09 -03:30
Dan J Miller
18ca9d14e0
Do case-insensitive comparisons of token addresses in view-quote and build-quote (#12315) 2021-10-08 18:57:45 -02:30
Daniel
28fc2d471f
Quotes prefetching in Swaps (#11915) 2021-09-15 15:13:18 +02:00
Niranjana Binoy
eb987a47b5
Integrating the TokenListController to Extension (#11398) 2021-09-09 16:56:27 -04:00
Daniel
6f0d6b1693
Add support for swaps via a direct contract for wrapping and unwrapping (#11845)
* Update contract address validations in swaps for different networks

* Add support for direct contract swaps for wrapping and unwrapping

* Add WETH_RINKEBY_CONTRACT_ADDRESS
2021-09-08 20:08:55 +02:00
ryanml
472cf17bda
Adding UI helpers for URL parsing (#11899) 2021-08-24 15:28:16 -07:00
Daniel
410c4aec9a
Fix Insufficient number of substitutions for key "swapYourTokenBalance" (#11833)
* Fix Insufficient number of substitutions for key "swapYourTokenBalance"

* Use an empty string if there is no default symbol

* Add ? after SWAPS_CHAINID_DEFAULT_TOKEN_MAP[chainId]
2021-08-13 08:26:42 -07:00
Daniel
a17c4462b4
Add token decimals validation in Swaps (#11587)
* Add token decimals validation in Swaps
* Use camelCase
2021-07-22 19:29:31 +02:00
Daniel
d438439661
Swaps: Add conditional routing to new APIs based on a feature flag (#11470) 2021-07-09 10:24:00 -05:00
David Walsh
afe06adb7a
Add icon to actionable message component (#11409) 2021-07-02 14:07:56 -05:00
Brad Decker
b073b04789
move metamask state selectors out of send (#11249) 2021-06-08 11:03:59 -05:00
Daniel
c3b79bb358
Show custom tokens in Swaps, add a custom token in Swaps (#11200)
* Show custom tokens in Swaps

* Add messages for adding a custom token in Swaps

* Add the first version of importing custom tokens in swaps

* Fix lint rules

* Create a new component: ImportToken

* Remove a pointer cursor from regular heading

* Fix a CSS issue for tokens with long names

* Update a comment

* Don’t return a custom token if it doesn’t have symbol or decimals

* Only search by contract address if nothing was found

* Track “Token Imported” event

* Fix unit tests

* Import tracking for “Token Imported”, increase token icon font size

* Disable token import for Source Token

* Update logic and content for notifications, update tests

* Do not hide a dropdown placeholder on click, so a user can click on a link

* Update a key name

* Update styling for the “danger” type notification in Swaps

* Show either a warning or danger notification based on token verification occurences

* Remove testnets from SWAPS_CHAINID_DEFAULT_BLOCK_EXPLORER_URL_MAP

* Use the “shouldSearchForImports” prop

* Create a new function for handling token import: “onOpenImportTokenModalClick”

* Filter token duplicities before iterating over tokens

* Use “address” instead of “symbol” for checking uniqueness

* Trigger Build

* Use a new API (/token) to get token data for importing in Swaps

* Temporarily decrese Jest threshold for functions
2021-06-03 13:38:37 -02:30
Etienne Dusseault
4c341d83ab
Add Approval Confirmation Screen component to Storybook (#10998)
* add metametrics wrapper

* add history dep

* provide test data and mock react router

* add first confirmaion screen

* figure out a way to mock match.params

* render token approval with data

* fix lockfile

* fix lint

* remove use effect

* lintfix

* add . for src paths

* litfix

* Add knobs to change redux store for confirm-approve component (Storybook) (#11135)

* add knob for domain

* knobify

* remove logs

* remove comment

* lintfix

* fix comments

* add background calls + metriccs event to storybook acctions

* lintfixxxx
2021-05-25 08:20:09 +08:00
Alex Donesky
f19207ca87
use etherscan-link customBlockExplorer methods with customNetwork usage tracking (#11017)
* use etherscan-link customBlockExplorer methods with customNetwork usage tracking

* consolidate blockexplorer events, add domain to metametrics event

* lint fix
2021-05-19 09:51:47 -05:00
Daniel
d7754f39bd
Allow 0% slippage, show a warning for 0 < slippage <= 1, disable "Review Swap" button for negative slippage (#10936)
* Allow 0% slippage, show a warning for 0 < slippage <= 1, disable “Review Swap” button for negative slippage

* Update a translation key, use both new and old key until it’s translated everywhere

* Keep an old key for `en`: swapSlippageTooLow

* Fix an ESLint issue

* Only use swapSlippageNegative, remove swapSlippageTooLow
2021-05-05 14:47:38 -02:30
Brad Decker
09d81ac5f2
remove the ui/app and ui/lib folders (#10911) 2021-04-28 14:53:59 -05:00