Skip to content

Commit

Permalink
feat: Change copy from estimated to network fee (#26859)
Browse files Browse the repository at this point in the history
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

Update copy and corresponding tests.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/26859?quickstart=1)

## **Related issues**

Fixes: MetaMask/MetaMask-planning#3063

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
  • Loading branch information
pedronfigueiredo authored Sep 4, 2024
1 parent e44420e commit 3e68e38
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 11 deletions.
3 changes: 3 additions & 0 deletions app/_locales/en/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions test/e2e/tests/confirmations/transactions/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,13 +226,13 @@ export async function toggleAdvancedDetails(driver: Driver) {
}

export async function assertAdvancedGasDetails(driver: Driver) {
await driver.waitForSelector({ css: 'p', text: 'Estimated fee' });
await driver.waitForSelector({ css: 'p', text: 'Network fee' });
await driver.waitForSelector({ css: 'p', text: 'Speed' });
await driver.waitForSelector({ css: 'p', text: 'Max fee' });
}

export async function assertAdvancedGasDetailsWithL2Breakdown(driver: Driver) {
await driver.waitForSelector({ css: 'p', text: 'Estimated fee' });
await driver.waitForSelector({ css: 'p', text: 'Network fee' });
await driver.waitForSelector({ css: 'p', text: 'L1 fee' });
await driver.waitForSelector({ css: 'p', text: 'L2 fee' });
await driver.waitForSelector({ css: 'p', text: 'Speed' });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ describe('Contract Interaction Confirmation', () => {

const editGasFeesRow =
within(gasFeesSection).getByTestId('edit-gas-fees-row');
expect(editGasFeesRow).toHaveTextContent('Estimated fee');
expect(editGasFeesRow).toHaveTextContent('Network fee');

const firstGasField = within(editGasFeesRow).getByTestId('first-gas-field');
expect(firstGasField).toHaveTextContent('0.0084 ETH');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ exports[`<ApproveInfo /> renders component for approve request 1`] = `
<p
class="mm-box mm-text mm-text--body-md-medium mm-box--color-inherit"
>
Estimated fee
Network fee
</p>
<div>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ exports[`<BaseTransactionInfo /> renders component for contract interaction requ
<p
class="mm-box mm-text mm-text--body-md-medium mm-box--color-inherit"
>
Estimated fee
Network fee
</p>
<div>
<div
Expand Down Expand Up @@ -593,7 +593,7 @@ exports[`<BaseTransactionInfo /> renders component for contract interaction requ
<p
class="mm-box mm-text mm-text--body-md-medium mm-box--color-inherit"
>
Estimated fee
Network fee
</p>
<div>
<div
Expand Down Expand Up @@ -950,7 +950,7 @@ exports[`<BaseTransactionInfo /> renders component for contract interaction requ
<p
class="mm-box mm-text mm-text--body-md-medium mm-box--color-inherit"
>
Estimated fee
Network fee
</p>
<div>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ exports[`<EditGasFeesRow /> renders component 1`] = `
<p
class="mm-box mm-text mm-text--body-md-medium mm-box--color-inherit"
>
Estimated fee
Network fee
</p>
<div>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const EditGasFeesRow = ({
alertKey={RowAlertKey.EstimatedFee}
ownerId={transactionMeta.id}
data-testid="edit-gas-fees-row"
label={t('estimatedFee')}
label={t('networkFee')}
tooltip={t('estimatedFeeTooltip')}
>
<Box
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ exports[`<GasFeesDetails /> renders component for gas fees section 1`] = `
<p
class="mm-box mm-text mm-text--body-md-medium mm-box--color-inherit"
>
Estimated fee
Network fee
</p>
<div>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ exports[`<GasFeesSection /> renders component for gas fees section 1`] = `
<p
class="mm-box mm-text mm-text--body-md-medium mm-box--color-inherit"
>
Estimated fee
Network fee
</p>
<div>
<div
Expand Down

0 comments on commit 3e68e38

Please sign in to comment.