-
-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ feat(metamask): Add gas customization to
confirmTransaction
(#1048)
- Loading branch information
1 parent
7b09f24
commit 08e1a36
Showing
6 changed files
with
314 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
wallets/metamask/src/pages/NotificationPage/selectors/transactionPage.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { createDataTestSelector } from '../../../utils/selectors/createDataTestSelector' | ||
|
||
const advancedGasFeeMenu = { | ||
maxBaseFeeInput: createDataTestSelector('base-fee-input'), | ||
priorityFeeInput: createDataTestSelector('priority-fee-input'), | ||
gasLimitEditButton: createDataTestSelector('advanced-gas-fee-edit'), | ||
gasLimitInput: createDataTestSelector('gas-limit-input'), | ||
gasLimitError: `div:has(> ${createDataTestSelector('gas-limit-input')}) + .form-field__error`, | ||
saveButton: '.popover-footer > button.btn-primary' | ||
} | ||
|
||
const lowGasFee = { | ||
button: createDataTestSelector('edit-gas-fee-item-low'), | ||
maxFee: `${createDataTestSelector('edit-gas-fee-item-low')} .edit-gas-item__fee-estimate` | ||
} | ||
|
||
const marketGasFee = { | ||
button: createDataTestSelector('edit-gas-fee-item-medium'), | ||
maxFee: `${createDataTestSelector('edit-gas-fee-item-medium')} .edit-gas-item__fee-estimate` | ||
} | ||
|
||
const aggressiveGasFee = { | ||
button: createDataTestSelector('edit-gas-fee-item-high'), | ||
maxFee: `${createDataTestSelector('edit-gas-fee-item-high')} .edit-gas-item__fee-estimate` | ||
} | ||
|
||
const editGasFeeMenu = { | ||
editGasFeeButton: createDataTestSelector('edit-gas-fee-button'), | ||
editGasFeeButtonToolTip: '.edit-gas-fee-button .info-tooltip', | ||
lowGasFee, | ||
marketGasFee, | ||
aggressiveGasFee, | ||
siteSuggestedGasFeeButton: createDataTestSelector('edit-gas-fee-item-dappSuggested'), | ||
advancedGasFeeButton: createDataTestSelector('edit-gas-fee-item-custom'), | ||
advancedGasFeeMenu | ||
} | ||
|
||
export default { | ||
editGasFeeMenu | ||
} |
Oops, something went wrong.