1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00
metamask-extension/ui/hooks
Olusegun Akintayo c54f9b3097
update gas fees (#13646)
* Draft methods to brak updateTransaction into smaller more targeted
methods.

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

* This is a combination of 76 commits.

normalize and validate tx params.

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

Method to normalize tx and check if it's unapproved.

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

Move the methods to controllers/transactions/index.js

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

Flesh out the methods to update transaction with custom notes.

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

enforce that only the properties for the specific methid can be updated via the method.

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

Test update gas fees

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

Update swap approval transaction

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

use lodash to remove undefined properties
update swap transaction tests

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

Updates transaction user settings.

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

Lint fixes.

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

Add more parameters to updateSwapTransaction
    approvalTxId
    estimatedBaseFee

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

Add Update Transaction Metrics

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

Update transaction gas fees actions.js

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

Lint fixes.

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

Update EIP 1559 Params.

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

Lint Fixes.

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

Documentations.

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

Remove metrics from this PR

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

Lint fixes: Removed unused variables

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

Add more params to updateTransactionGasFees.

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

Update eip1559 method to editableParams.

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

lint fixes.

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

Fix Mocha tests

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

add gasPrice to updateEditableParams

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

Remove duplicated Params in notes.

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

A few more tests to cover if
    transaction status is not unapproved
    transaction is passed more parameters than it requires.

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

Update Transaction Gas Fees.

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

Update gas fees in edit-gas-popover.

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

Remove metrics.

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

Update gas settings and user settings.

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

Lint fixes.

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

Fix unit tests.

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

Lint fixes.

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

Draft methods to brak updateTransaction into smaller more targeted
methods.

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

normalize and validate tx params.

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

Method to normalize tx and check if it's unapproved.

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

Move the methods to controllers/transactions/index.js

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

Flesh out the methods to update transaction with custom notes.

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

Test update gas fees

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

Update swap approval transaction

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

use lodash to remove undefined properties
update swap transaction tests

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

Updates transaction user settings.

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

Lint fixes.

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

Add Update Transaction Metrics

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

Update transaction gas fees actions.js

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

Lint fixes.

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

Update EIP 1559 Params.

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

Lint Fixes.

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

Documentations.

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

Remove metrics from this PR

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

Lint fixes: Removed unused variables

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

Add more params to updateTransactionGasFees.

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

Update eip1559 method to editableParams.

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

lint fixes.

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

Fix Mocha tests

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

add gasPrice to updateEditableParams

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

Remove duplicated Params in notes.

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

A few more tests to cover if
    transaction status is not unapproved
    transaction is passed more parameters than it requires.

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

Update Transaction Gas Fees.

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

Remove metrics.

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

Update gas settings and user settings.

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

Lint fixes.

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

Fix unit tests.

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

Lint fixes.

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

Remove dup;icated method from rebase.

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

unrelated change

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

Force re-run workflow

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

Lint fix

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

Do not hideLoading since we're not showing it.

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

UpdateTransaction should be renamed to updateGasFees

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

updateGasFees in gas-modal-page-container.

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

fix:
    update previous gas params update method
    add types to the jsdoc comments.

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

updateTransactionGasFees should have been updatePreviousGasParams

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

Previous gas fees can be updated for confirmed transactions.

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

add updatePreviousGasParams to mocked functions.

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

Lint fixes

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

* we need to await the first dispatch before we call the second

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

* update values to make tests pass

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

* More changes to make e2e pass

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

* Need to wait a bit after save for changes to take effect.

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

* Remove merge comments.

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

* Await one dispatch before calling another

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

* We don't need goHome anymore.

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

* Tests must use async...await syntax too since we have await in the
useTranasctionFunction

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

* Add delay after button click for values to update

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

* Wait a moment after clicking save for values to update

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

* Wait after clicking save...

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

* Merge update transaction gas fees and transaction user settings
Show loading indicator on edit gas popover
Fix tests.

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

* Lint fixes

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

* Fix JSDoc

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

* updatePreviousGasParams should also return updated transaction meta.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
2022-03-25 21:11:04 +04:00
..
gasFeeInput update gas fees (#13646) 2022-03-25 21:11:04 +04:00
useAddressDetails.js Confirm transaction page: show contract address details in title (#13683) 2022-03-02 20:56:53 +05:30
useAddressDetails.test.js Confirm transaction page: show contract address details in title (#13683) 2022-03-02 20:56:53 +05:30
useApproveTransaction.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
useAssetDetails.js Fix issue where we show contract address as recipient when calling safe transfer method on erc721 or erc1155 contracts (#13535) 2022-03-17 13:35:40 -05:00
useCollectiblesCollections.js Yet more NFT UX cleanups (#13435) 2022-01-31 12:56:49 -06:00
useCopyToClipboard.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
useCurrencyDisplay.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
useCurrencyDisplay.test.js move metamask state selectors out of send (#11249) 2021-06-08 11:03:59 -05:00
useCurrentAsset.js extract determineTransactionType from tx controller (#13737) 2022-03-07 12:54:36 -06:00
useEqualityCheck.js remove the ui/app and ui/lib folders (#10911) 2021-04-28 14:53:59 -05:00
useEthFiatAmount.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
useEventFragment.js Remove the useSegmentContext function from metametrics.new.js (#14013) 2022-03-25 09:26:09 -05:00
useEventFragment.test.js Remove the useSegmentContext function from metametrics.new.js (#14013) 2022-03-25 09:26:09 -05:00
useGasFeeErrors.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
useGasFeeErrors.test.js Extracting out error and warning code from useGasFeeInputs hook (#12283) 2021-10-18 17:25:35 +05:30
useGasFeeEstimates.js Alert users when the network is busy (#12268) 2022-01-07 12:18:02 -07:00
useGasFeeEstimates.test.js Restore heartbeat to transaction confirmation, use isGasEstimatesLoading more broadly (#11781) 2021-08-05 18:59:58 -05:00
useI18nContext.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
useIncrementedGasFees.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
useMethodData.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
useOriginMetadata.js Add Snaps via Flask (#13462) 2022-02-14 16:02:51 -08:00
usePrevious.js remove the ui/app and ui/lib folders (#10911) 2021-04-28 14:53:59 -05:00
useSafeGasEstimatePolling.js Stop GasFeeController polling when pop closes (#11746) 2021-08-04 16:53:13 -05:00
useSegmentContext.js Remove the useSegmentContext function from metametrics.new.js (#14013) 2022-03-25 09:26:09 -05:00
useShouldAnimateGasEstimations.js Improve flashing behaviour for loading gas estimates (on confirm screen) (#11852) 2021-08-16 20:18:24 -02:30
useShouldShowSpeedUp.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
useSwappedTokenValue.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
useTimeout.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
useTokenData.js Fix issue where we show contract address as recipient when calling safe transfer method on erc721 or erc1155 contracts (#13535) 2022-03-17 13:35:40 -05:00
useTokenData.test.js Update ESLint config to v8 (#12886) 2021-12-09 15:36:24 -03:30
useTokenDisplayValue.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
useTokenDisplayValue.test.js Fix issue where we show contract address as recipient when calling safe transfer method on erc721 or erc1155 contracts (#13535) 2022-03-17 13:35:40 -05:00
useTokenFiatAmount.js extract determineTransactionType from tx controller (#13737) 2022-03-07 12:54:36 -06:00
useTokensToSearch.js Fix token ordering: prioritize top before owned (#13270) 2022-01-17 15:55:23 -06:00
useTokenTracker.js extract determineTransactionType from tx controller (#13737) 2022-03-07 12:54:36 -06:00
useTransactionDisplayData.js extract determineTransactionType from tx controller (#13737) 2022-03-07 12:54:36 -06:00
useTransactionDisplayData.test.js Fixing address truncation papercuts (#12330) 2021-10-13 12:54:48 -05:00
useTransactionEventFragment.js Adding check for transaction.id in useTransactionEventFragment hook (#13587) 2022-02-10 22:00:34 +05:30
useUserPreferencedCurrency.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
useUserPreferencedCurrency.test.js Changed ETH decimal values to have 8 places for sending (#12437) 2021-11-05 07:52:03 -07:00