Skip to content

fix: Fix send max on gas value changes #30523

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions test/e2e/page-objects/flows/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,22 @@ export const createInternalTransaction = async (driver: Driver) => {
await sendToPage.goToNextScreen();
};

export const createInternalTransactionWithMaxAmount = async (
driver: Driver,
) => {
// Firefox has incorrect balance if send flow started too quickly.
await driver.delay(1000);

const homePage = new HomePage(driver);
await homePage.startSendFlow();

const sendToPage = new SendTokenPage(driver);
await sendToPage.check_pageIsLoaded();
await sendToPage.fillRecipient('0x2f318C334780961FB129D2a6c30D0763d9a5C970');
await sendToPage.clickMaxAmountButton();
await sendToPage.goToNextScreen();
};

export const createDappTransaction = async (
driver: Driver,
override?: Partial<TransactionParams>,
Expand Down
6 changes: 6 additions & 0 deletions test/e2e/page-objects/pages/send/send-token-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ class SendTokenPage {
private readonly warning =
'[data-testid="send-warning"] .mm-box--min-width-0 span';

private readonly maxAmountButton = '[data-testid="max-clear-button"]';

constructor(driver: Driver) {
this.driver = driver;
}
Expand Down Expand Up @@ -138,6 +140,10 @@ class SendTokenPage {
await this.driver.pasteIntoField(this.inputRecipient, recipientAddress);
}

async clickMaxAmountButton(): Promise<void> {
await this.driver.clickElement(this.maxAmountButton);
}

async goToNextScreen(): Promise<void> {
await this.driver.clickElement(this.continueButton);
}
Expand Down
Loading
Loading