1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
Commit Graph

59 Commits

Author SHA1 Message Date
Alex Donesky
9b6acb7370
Use higher gasfees when attempting to speedup or cancel a transaction () 2021-08-25 16:04:18 -07:00
Dan J Miller
05fa7961f1
Dont default gas limit in gas popover when non is available on transaction params ()
* Dont default gas limit when non is available on transaction params

* Fix unit tests
2021-08-18 02:54:53 -07:00
Dan J Miller
29487ef277
Allow submission of transactions with dapp suggested gas fees, while estimates are loading ()
* Allow submission of transactions with dapp suggested gas fees, while estimates are loading

* Allow editing of transactions with dapp suggested feeds, while estimates are still loading

* Ensure that advanced gas is always editible inline when gas is loading

* Ensure that insufficient balance error is shown when gas is loading if the user has customized the gas

* Only set gas price insufficient errors if the current network is non-eip-1559, or the txparams actually have a gas price

* Remove unnecessary param

* lint fix

* ensure insufficient balance warning is showing when loading

* Ensure that eip1559 network transactions do not combined eip1559 and non-eip1559 gas fee properties

* Lint fix
2021-08-17 17:38:13 -02:30
Dan J Miller
ae247ea14a
Improve flashing behaviour for loading gas estimates (on confirm screen) ()
* Improve flashing behaviour for loading gas estimates

* Fix typo

* renderHeartBeatIfInTest
2021-08-16 20:18:24 -02:30
ryanml
38b581cdfa
Return an empty string when date is not provided [Date display utils] () 2021-08-13 08:22:12 -07:00
David Walsh
e0692db7ba
Remove unwanted console.log from codebase () 2021-08-12 08:13:51 -05:00
Dan J Miller
e6543a83ef
Ensure transaction activity log supports EIP-1559 ()
* Ensure transaction activity log supports EIP-1559

* unit test fix

* Add estimated base fee to swaps txMeta

* fix lint and tests

* Improve activity log copy
2021-08-06 19:48:53 -02:30
Alex Donesky
1216dc95c0
Hide gasTiming on edit-gas-popover when form is in error ()
* Hide gasTiming on edit-gas-popover when form is in error

* Show unknown processing error if maxFeePerGas is too low for network conditions

* remove unnecessary change

* remove unnecessary function wrapper
2021-08-06 16:37:18 -05:00
Dan J Miller
bfde5a1d77
Fixes updates on the confirm screen. ()
* Fixes updates on the confirm screen.

* Better handling of internal send transactions

* maxFee -> maxFeePerGas property name fix

* Remove redundant setEstimateToUse call in onManualChange

* Fix unit tests

* rebase error fix

* Fixes to speedup loading and transaction breakdown priority fee

* Fix lint and unit tests

* Ensure gas price based transaction that have been customized (e.g. speed up and retry) are properly initialized in useGasFeeInputs

* Clean up

* Link fix
2021-08-06 14:31:30 -05:00
David Walsh
a0bd496d56
Restore heartbeat to transaction confirmation, use isGasEstimatesLoading more broadly () 2021-08-05 18:59:58 -05:00
Alex Donesky
804fefcd36
Separate out non blocking gas errors () 2021-08-05 17:53:48 -05:00
Dan J Miller
e9ef3b168a
Allow max fee to be equal to max priority fee () 2021-08-05 14:15:02 -02:30
Dan J Miller
0cf5019486
Use bignumber for number comparisons in useGasFeeInput ()
* Use bignumber for number comparisons in useGasFeeInput

* fix
2021-08-05 13:52:56 -02:30
Dan J Miller
01262d33a4
Ensure that gas fee inputs fallback to tx params values if api is down ()
* Ensure that gas fee inputs fallback to tx params values if down

* ensure getGasFeeEstimate fallback is a string
2021-08-05 08:33:49 -02:30
Dan J Miller
9fcd93191b
Ensure that gas fee minimum errors show when api is down ()
* Fix legacy unapproved tx handling

* clean up
2021-08-04 20:14:20 -02:30
Dan J Miller
818dc13019
Fix legacy unapproved tx handling () 2021-08-04 19:53:15 -02:30
Alex Donesky
d359429f04
Stop GasFeeController polling when pop closes ()
* Stop GasFeeController polling when pop closes

* Stop estimate gas polling on window unload

* lint + comments

* Improve client closed logic

* lint

* Add back _beforeUnload on unmount in gas-modal-page-container

* Add full check and call onClientClosed method for notifcation environment

* Add gas pollingToken tracking to appStateController and use to disconnect polling for each environment type

* remove unused method

* move controller manipulation logic from background.js to metamask-controller, disaggregate methods

* add beforeunload handling to reset gas polling tokens from root of send page

* cleanup, lint and address feedback

* clear appState gasPollingTokens when all instances of all env types are closed, fix pollingTokenType arg from onEnvironmentTypeClosed call in metamask-controller

* mock new methods to fix tests

* final bit of cleanup + comments

Co-authored-by: Dan Miller <danjm.com@gmail.com>
2021-08-04 16:53:13 -05:00
Dan J Miller
a950111a19
Show advanced options, and hide radio buttons, for advanced gas settings users ()
* Show advanced options, and hide radio buttons, for users with advanced gas settings turned on

* Improve naming and copy

* lint fix

* Lint fix
2021-08-04 19:04:42 -02:30
Dan J Miller
3f4c988018
Ensure gas fees update in popover on poll for new values () 2021-08-04 18:27:14 -02:30
Dan J Miller
b9fb495c7b
Allow max priority fee to be below 1, and only require it to be greater than 0 () 2021-08-04 10:53:52 -02:30
Dan J Miller
61b965a8a2
Allows users to set a max priority fee below suggested, just showing a warning in that case () 2021-08-04 10:53:19 -02:30
David Walsh
24d563fc2c
EIP-1559 - Show minium native currency in banner when on testnets () 2021-08-03 12:51:02 -05:00
David Walsh
fba662ca2b
EIP-1559 - Provide better validation for gas price and gas limit () 2021-08-03 10:54:49 -05:00
Dan J Miller
7ac1972371
Ensure that gas price in popover updates when api provided estimate updates () 2021-08-02 21:09:21 -05:00
David Walsh
c8b3dfe4e9
EIP-1559 - Fall back to gasLimit and gasPrice for hardware wallets () 2021-08-02 17:52:18 -05:00
Dan J Miller
8481c4b6be
Show warning when network request for fee market estimates fails () 2021-08-02 19:19:07 -02:30
David Walsh
d34bf92fd0
Fix 11705 - Reset gas limit when radio button clicked ()
* Fix 11705 - Reset gas limit when radio button clicked

* Trigger manual change when gasLimit is changed

* Coordinate gas limit with radio buttons

* Revert "Coordinate gas limit with radio buttons"

This reverts commit 910327a408e32ae989c5565a107db24ac24f2a98.

* Cleanup default gas limit

* setEstimateToUse only update gasLimit on error, add default minimum gasLimit

* add minimum gasLimit fallback

Co-authored-by: Alex <adonesky@gmail.com>
2021-08-02 17:58:30 -02:30
David Walsh
4ce6994a6c
Fix - Prevent maxFee and maxPriorityFee imbalance () 2021-08-02 09:07:29 -05:00
David Walsh
38ff2c937f
Fix - Provide wiring for approval modal () 2021-08-02 09:07:15 -05:00
David Walsh
39823b3800
EIP-1559 - Implement speedup and cancel buttons () 2021-07-31 08:01:29 -05:00
Alex Donesky
8a42258e10
Remove the SHOW_EIP_1559_UI environment variable, replace with network detection where appropriate ()
Fixing up tests and add back old custom gas modal for non-eip1559 compliant networks

Remove unnecessary props from send-gas-row.component

fix breaking test

Fix primary and secondary title overrides

fix rebase issue

Fix rebase conflict

Co-authored-by: David Walsh <davidwalsh83@gmail.com>
2021-07-30 22:59:21 -02:30
Brad Decker
e0953d9f68
Update send and confirm state management, and tx controller gas defaults, for EIP1559 ()
wip

Documentation improvements for send slice support of EIP1559

Remove console.log in send duck

Property lookup safety improvement in selectors/confirm-transaction

Add code accidentally removed in rebase

Update addTxGasDefaults and _getDefaultGasFees to work with new estimate types, and ensure we correctly handle gas price estimates when on EIP1559 networks ()

* Fix typo

Remove console.log in send duck

* Update addTxGasDefaults and _getDefaultGasFees to work correctly with all new gas fee estimate types

* Don't show gas timing support when not on eip1559 compatible network

* Hide gas timing component on transaction screen when on a non-1559 network

* Improve comments, tests and edge case handling

* Ensure eip1559 fees are applied and updated correctly when eip1559 estimate api fails

* Lint fix

Co-authored-by: Brad Decker <git@braddecker.dev>

Remove console.log

Handle possible gasEstimateType undefined

Remove unnecessary nonce field position change in confirm-page-container-content__details
2021-07-30 22:15:18 -02:30
Dan J Miller
f1140087b7
Adds insufficient gas error to edit-gas-display () 2021-07-30 20:16:31 -02:30
Daniel
714170c7b8
EIP-1559 and Rinkeby Testnet support in Swaps () 2021-07-30 13:35:30 +02:00
Dan J Miller
b4722ff81d
Fix to having radio buttons in advanced gas inputs pre-selected ()
* Ensure fees match in use gas inputs

* Lint fix
2021-07-29 16:00:21 -02:30
David Walsh
604524f94d
EIP-1559 - Restore custom values in Edit Gas Popover ()
* EIP-1559 - Restore custom values in Edit Gas Popover

* Provide method to tell which radio button the user may have selected

* Use lodash's findKey

* Add case for legacy gas

* Use gas instead of gasLimit

* Remove unnecessary deletion and todo
2021-07-27 17:12:56 +02:00
David Walsh
a2be02dfeb
EIP-1559 - Show gas estimate updating animation in transaction detail () 2021-07-26 10:24:44 -05:00
ryanml
8cb1557f1c
Adding method to capture one-time Sentry exceptions () 2021-07-22 16:13:40 -07:00
David Walsh
286fd397f8
EIP-1559 - Maintain changed form values and unselect radio buttons when user customizes form value () 2021-07-22 11:32:59 -05:00
David Walsh
6d92759853
EIP-1559 - Implement form validation for EIP-1559 ()
* Restructure advanced gas form errors

* Use shared constant for gas errors

* Add validation for fields too low

* Add warnings for high max fee and max priority fee

* Fix lint

* Fix priority fee high warning string
2021-07-20 14:34:32 -05:00
Brad Decker
dc25a24de3
rely upon gas fee controller for gas price estimates () 2021-07-16 11:06:32 -05:00
Brad Decker
9416d1ca71
provide skeleton for submitting gas form () 2021-07-12 14:35:54 -05:00
Brad Decker
c3e6514c35
add useGasInputs hook () 2021-07-09 13:26:54 -05:00
Brad Decker
f51a8451b8
add useGasEstimates hook () 2021-07-09 10:23:45 -05:00
Brad Decker
64adfe7b11
update speedup and cancel to make room for EIP-1559 ()
* prepare for EIP1559 gas fields in speedup/cancel

* Update ui/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js
2021-07-08 13:48:23 -05:00
Brad Decker
da9fb4636b
move conversion utils to shared folder () 2021-07-06 12:48:49 -05:00
Alex Donesky
a4a5580785
Update controllers with conversionRate change with minimal required changes in extension ()
* updating controllers with conversionRate change with minimal required changes in extension

* swapping showFiat selector in places where possible

* adding invalid conversion protection

* lint fixes

* adjusting list-item styling logic
2021-06-23 18:28:49 -05:00
Alex Donesky
e10ddbe3a3
add erc-721 token detection and flag to disable sending ()
* add erc-721 token detection and flag to disable sending

* addressing feedback

* remove redundant provider instantiation

* fix issue caused by unprotected destructuring

* add tests and documentation

* move add isERC721 flag to useTokenTracker hook

* Update  and  unit tests

* use memoizedTokens in useTokenTracker

Co-authored-by: Dan Miller <danjm.com@gmail.com>
2021-06-22 12:39:44 -05:00
ryanml
2bfc3a093f
Using values from shared/constants/time to represent timing values () 2021-06-10 12:27:03 -07:00
Brad Decker
b073b04789
move metamask state selectors out of send () 2021-06-08 11:03:59 -05:00