Skip to content

feat: extend W3mFrameProvider timeout from 30s to 2 minutes #4451

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

devin-ai-integration[bot]
Copy link
Contributor

Extend W3mFrameProvider timeout from 30 seconds to 2 minutes

Summary

This PR extends the request timeout in the W3mFrameProvider from 30 seconds to 2 minutes to allow more time for users completing operations like device approval and OTP input.

Changes Made

  • W3mFrameProvider.ts: Updated timeout from 30_000 to 120_000 milliseconds in the appEvent method
  • W3mFrameProvider.test.ts: Updated test timeout from 31_000 to 121_000 milliseconds and test description
  • Updated comment to reflect the new 2-minute timeout period

Testing

  • All existing tests pass including the updated timeout test
  • Build and formatting checks completed successfully
  • Verified timeout behavior works correctly with the new 2-minute limit

Ticket

Fixes APKT-3008

Link to Devin run

https://app.devin.ai/sessions/5ec0086490bb485bba660172e022f89d

Requested by

Sven Voskamp ([email protected])

- Increase timeout from 30_000 to 120_000 milliseconds in appEvent method
- Update corresponding test timeout from 31_000 to 121_000 milliseconds
- Allow more time for device approval and OTP input operations

Fixes APKT-3008

Co-Authored-By: Sven Voskamp <[email protected]>
Copy link

vercel bot commented Jun 2, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
appkit-basic-html ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 3, 2025 7:47am
appkit-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 3, 2025 7:47am
appkit-laboratory ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 3, 2025 7:47am
10 Skipped Deployments
Name Status Preview Comments Updated (UTC)
appkit-basic-example ⬜️ Ignored (Inspect) Jun 3, 2025 7:47am
appkit-basic-sign-client-example ⬜️ Ignored (Inspect) Jun 3, 2025 7:47am
appkit-basic-up-example ⬜️ Ignored (Inspect) Visit Preview Jun 3, 2025 7:47am
appkit-ethers5-bera ⬜️ Ignored (Inspect) Jun 3, 2025 7:47am
appkit-nansen-demo ⬜️ Ignored (Inspect) Jun 3, 2025 7:47am
appkit-vue-solana ⬜️ Ignored (Inspect) Jun 3, 2025 7:47am
appkit-wagmi-cdn-example ⬜️ Ignored (Inspect) Jun 3, 2025 7:47am
ethereum-provider-wagmi-example ⬜️ Ignored (Inspect) Jun 3, 2025 7:47am
next-wagmi-solana-bitcoin-example ⬜️ Ignored (Inspect) Jun 3, 2025 7:47am
vue-wagmi-example ⬜️ Ignored (Inspect) Jun 3, 2025 7:47am

Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link

linear bot commented Jun 2, 2025

Copy link

changeset-bot bot commented Jun 2, 2025

⚠️ No Changeset found

Latest commit: 11cae10

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Jun 2, 2025

Warnings
⚠️ File apps/laboratory/tests/email-after-farcaster.spec.ts contains a KEY or SECRET
⚠️ File apps/laboratory/tests/email.spec.ts contains a KEY or SECRET
⚠️ File packages/wallet/src/W3mFrameProvider.ts contains a KEY or SECRET

Generated by 🚫 dangerJS against 11cae10

Copy link
Contributor

github-actions bot commented Jun 2, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 76.52% 27426 / 35838
🔵 Statements 76.52% 27426 / 35838
🔵 Functions 68.16% 2317 / 3399
🔵 Branches 83.75% 5526 / 6598
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/wallet/src/W3mFrameProvider.ts 48.67% 73.91% 49.35% 48.67% 65-68, 72-73, 81-87, 104-112, 132-140, 149-151, 160-162, 165-173, 177-189, 192-205, 208-220, 223-234, 237-252, 261-263, 275-277, 281-294, 297-306, 323-324, 333-335, 351-353, 369-371, 375-391, 394-405, 408-422, 435-437, 441-459, 462-481, 498-506, 510-518, 525-527, 535-537, 542-551, 557-561, 567-571, 576-577, 583-585, 589-590, 651-653, 655-659, 664-665, 680-690, 705-706, 718-722, 731-735, 738-268, 489-555
Generated in workflow #12360 for commit 11cae10 by the Vitest Coverage Report Action

@svenvoskamp
Copy link
Contributor

Please also update the E2E tests with the correct timings

…eout

- Update WalletPage.ts session button visibility timeout from 30s to 2 minutes
- Update ModalValidator.ts signing success toast timeout from 30s to 2 minutes
- Ensures E2E tests align with extended frame provider timeout for device approval and OTP operations

Co-Authored-By: Sven Voskamp <[email protected]>
@@ -87,7 +87,7 @@ export class WalletPage {
await this.page.waitForLoadState()
const btn = this.page.getByTestId(`session-${variant}-button`)
await expect(btn, `Session ${variant} element should be visible`).toBeVisible({
timeout: 30000
timeout: 120000
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No this change is not correct, please have a look at the following tests and change them to the new timeout values:

email-after-farcaster.spec.ts: it should abort embedded wallet flow if it takes more than 20 seconds after abort login with farcaster
email.spec.ts it should abort embedded wallet flow if it takes more than 20 seconds

@@ -148,7 +148,7 @@ export class ModalValidator {
async expectAcceptedSign() {
// We use Chakra Toast and it's not quite straightforward to set the `data-testid` attribute on the toast element.
await expect(this.page.getByText(ConstantsUtil.SigningSucceededToastTitle)).toBeVisible({
timeout: 30 * 1000
timeout: 120 * 1000
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for the above comment

…o 2 minutes

- Revert WalletPage.ts session button timeout back to 30 seconds (incorrect change)
- Revert ModalValidator.ts signing toast timeout back to 30 seconds (incorrect change)
- Update email-after-farcaster.spec.ts embedded wallet abort test from 20s to 2 minutes
- Update email.spec.ts embedded wallet abort test from 20s to 2 minutes
- Addresses svenvoskamp's GitHub comments on PR #4451

Co-Authored-By: Sven Voskamp <[email protected]>
@svenvoskamp
Copy link
Contributor

The timeout is too long so the browser will close already in the E2E tests, could you simulate it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant