Skip to content

Commit

Permalink
Merge pull request #180 from lidofinance/fix-metamask-tx-signing
Browse files Browse the repository at this point in the history
Fix the transaction signing
  • Loading branch information
jake4take authored Aug 26, 2024
2 parents 1c2e6c7 + b3e3a74 commit bfa42f4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/wallets/src/metamask/metamask.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,7 @@ export class MetamaskPage implements WalletPage {

async signTx(page: Page) {
await test.step('Sign TX', async () => {
await page.getByTestId('signature-request-scroll-button').click();
await page.getByTestId('page-container-footer-next').click();
await page.getByTestId('confirm-footer-button').click();
});
}

Expand All @@ -368,6 +367,12 @@ export class MetamaskPage implements WalletPage {
});
}

async cancelSignTx(page: Page) {
await test.step('Cancel sign TX', async () => {
await page.getByTestId('confirm-footer-cancel-button').click();
});
}

async approveTokenTx(page: Page) {
await test.step('Approve token tx', async () => {
await this.useDefaultToApprove(page);
Expand Down
2 changes: 2 additions & 0 deletions packages/wallets/src/wallet.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export interface WalletPage {

rejectTx?(page: Page): Promise<void>;

cancelSignTx?(page: Page): Promise<void>;

approveTokenTx?(page: Page): Promise<void>;

openLastTxInEthplorer?(txIndex?: number): Promise<Page>;
Expand Down

0 comments on commit bfa42f4

Please sign in to comment.