Skip to content

Commit

Permalink
po: fix for notification page tx confirmation
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Mucha <[email protected]>
  • Loading branch information
drptbl committed Oct 18, 2022
1 parent 8ad2335 commit 03a99da
Showing 1 changed file with 22 additions and 16 deletions.
38 changes: 22 additions & 16 deletions pages/metamask/notification-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,29 +37,35 @@ module.exports.permissionsPageElements = {

const confirmPageHeader = `${notificationPage} .confirm-page-container-header`;
const confirmPageContent = `${notificationPage} .confirm-page-container-content`;
const confirmPageGasFeeSection = `${confirmPageContent} .confirm-page-container-content__gas-fee`;
const gasFeeLabel = `${confirmPageGasFeeSection} .currency-display-component__text`;
const gasFeeInput = `${confirmPageGasFeeSection} .advanced-gas-inputs__gas-edit-row:nth-child(1) .advanced-gas-inputs__gas-edit-row__input`;
const gasFeeArrowUpButton = `${confirmPageGasFeeSection} .advanced-gas-inputs__gas-edit-row:nth-child(1) .advanced-gas-inputs__gas-edit-row__input-arrows__i-wrap:nth-child(1)`;
const gasFeeArrowDownButton = `${confirmPageGasFeeSection} .advanced-gas-inputs__gas-edit-row:nth-child(1) .advanced-gas-inputs__gas-edit-row__input-arrows__i-wrap:nth-child(2)`;
const gasLimitInput = `${confirmPageGasFeeSection} .advanced-gas-inputs__gas-edit-row:nth-child(2) .advanced-gas-inputs__gas-edit-row__input`;
const gasLimitArrowUpButton = `${confirmPageGasFeeSection} .advanced-gas-inputs__gas-edit-row:nth-child(2) .advanced-gas-inputs__gas-edit-row__input-arrows__i-wrap:nth-child(1)`;
const gasLimitArrowDownButton = `${confirmPageGasFeeSection} .advanced-gas-inputs__gas-edit-row:nth-child(2) .advanced-gas-inputs__gas-edit-row__input-arrows__i-wrap:nth-child(2)`;
const totalLabel = `${confirmPageContent} div:nth-child(2) > .confirm-detail-row .currency-display-component__text`;
const editGasFeeButton = `${notificationPage} [data-testid="edit-gas-fee-button"]`;
const gasOptionLowButton = `${notificationPage} [data-testid="edit-gas-fee-item-low"]`;
const gasOptionMediumButton = `${notificationPage} [data-testid="edit-gas-fee-item-medium"]`;
const gasOptionHighButton = `${notificationPage} [data-testid="edit-gas-fee-item-high"]`;
const gasOptionDappSuggestedButton = `${notificationPage} [data-testid="edit-gas-fee-item-dapp-suggested"]`;
const gasOptionCustomButton = `${notificationPage} [data-testid="edit-gas-fee-item-custom"]`;
const baseFeeInput = `${notificationPage} [data-testid="base-fee-input"]`;
const priorityFeeInput = `${notificationPage} [data-testid="priority-fee-input"]`;
const editGasLimitButton = `${notificationPage} [data-testid="advanced-gas-fee-edit"]`;
const gasLimitInput = `${notificationPage} [data-testid="gas-limit-input"]`;
const saveCustomGasFeeButton = `${notificationPage} .popover-container .btn-primary`;
const totalLabel = `${confirmPageContent} .transaction-detail-item:nth-child(2) .transaction-detail-item__detail-values h6:nth-child(2)`; // todo: fix
const rejectButton = `${confirmPageContent} [data-testid="page-container-footer-cancel"]`;
const confirmButton = `${confirmPageContent} [data-testid="page-container-footer-next"]`;
module.exports.confirmPageElements = {
notificationPage,
confirmPageHeader,
confirmPageContent,
confirmPageGasFeeSection,
gasFeeLabel,
gasFeeInput,
gasFeeArrowUpButton,
gasFeeArrowDownButton,
editGasFeeButton,
gasOptionLowButton,
gasOptionMediumButton,
gasOptionHighButton,
gasOptionDappSuggestedButton,
gasOptionCustomButton,
baseFeeInput,
priorityFeeInput,
editGasLimitButton,
gasLimitInput,
gasLimitArrowUpButton,
gasLimitArrowDownButton,
saveCustomGasFeeButton,
totalLabel,
rejectButton,
confirmButton,
Expand Down

0 comments on commit 03a99da

Please sign in to comment.