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

15 Commits

Author SHA1 Message Date
Mark Stacey
ec7e7fdf6d
Fix fallback gas estimation (#19746)
* Fix fallback gas estimation

Our fallback gas estimation was failing due to a bug in the
`@metamask/controller-utils` package. This was causing gas estimation
to fail completely on certain networks (those not supported by our gas
estimation APIs and non EIP-1559 compatibile), and it was causing the
fallback gas estimation operation (in case our API was down) to fail
across all networks.

Fixes https://github.com/MetaMask/metamask-extension/issues/19735

* Add e2e tests

E2E tests have been added to capture gas estimation. Cases are added
for our API, for the fallback estimate, and for non-EIP-1559 estimates.

As part of this work, the legacy gas API had to be disabled. This was
being used in e2e tests but was dead code in production. It needed to
be disabled to ensure the code under test was reachable.

* Fix gas API referenced in e2e test

* Update unit test snapshots
2023-06-26 16:13:16 -02:30
Olusegun Akintayo
e2c4e93ab0
When gas fees suggested by dapp is too high, show warning color and icon (#19088)
* When gas fees suggested by dapp is too high, show warning color and icon

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

tests

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

Fix tests

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

set a default for high gas fees

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

Fix test cases where transaction is undefined.

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

Fix locale error

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

Fix error where dappSuggestedGasFees is null

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

Fix icon for site suggested

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

Fix unit tests snapshot

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* Fix QA Comments

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* lint:fix

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* Fix unit tests

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* Fix PR comments

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* Lint fix

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* Fix PR comment. - call setEstimateUsed only once.

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* use constants for Priority levels.

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

---------

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>
2023-06-08 13:26:18 +03:00
Ariella Vu
aa9ee8af6c
Update useDraftTransactionGasValues (#19105)
* useDraftTransactionGasValues: update return value

* rn useDraftTransactionGasValues
-> useDraftTransactionWithTxParams
2023-05-12 13:27:25 -05:00
Dan J Miller
578f73b2ea
Ensure the GasDetailsItem component can handle a tx with a maxPriorityFee of 0 (#19102)
* Ensure the GasDetailsItem component can handle a tx with a maxPriorityFee of 0

* Clean up code

* Update ui/components/app/gas-details-item/gas-details-item.js

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

---------

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2023-05-12 12:31:15 -02:30
Ariella Vu
a5d7cf3319
Transaction cleanup and fix TransactionDetailItem key not unique bug (#18899)
* TransactionDetailItem: allow empty detailText

* TxDetailItem: fix keys; ensure unique keys
2023-05-02 00:42:59 -03:00
Niranjana Binoy
fedd6d4970
New reusable gas-display component (#17976) 2023-04-17 10:34:26 -04:00
Danica Shen
794f3039f1
feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
Niranjana Binoy
a0bb4a6c5a
Toggle option to enable/disable balance and Token rate checking for using third-party API (#16772) 2023-01-17 10:23:04 -05:00
Nidhi Kumari
0fd37cd5ff
removed i18nValue component (#15179)
* removed i18nValue component

* fixed bracket issue
2022-07-12 19:29:38 +05:30
Zachary Belford
c2d5bd01c4
Changed networks tab to explicitly pass in false and fix implicit type casting 2022-06-08 14:24:36 -07:00
George Marshall
9d1818df1b
Dark Mode: updating COLORS.BLACK to COLORS.TEXT_DEFAULT (#14063) 2022-03-21 08:58:27 -05:00
Jyoti Puri
6e8f4a6a76
gas fee details displayed on UI should be used gas estimates if available (#13809) 2022-03-03 05:52:46 +05:30
Jyoti Puri
a0e97f4681
EIP-1559 v2 - small fixes (#13392) 2022-01-26 23:48:43 +05: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
Jyoti Puri
f5dcd12293
using 1559 V2 for cancel speed up flows (#13019) 2022-01-06 08:17:26 +05:30