Skip to content

Skip fallback receipt wait#7

Merged
TuDo1403 merged 1 commit intomainfrom
tudo/fix-evm-wallet-chain
Apr 13, 2026
Merged

Skip fallback receipt wait#7
TuDo1403 merged 1 commit intomainfrom
tudo/fix-evm-wallet-chain

Conversation

@TuDo1403
Copy link
Copy Markdown
Collaborator

Summary

  • Return the direct EOA fallback transaction hash immediately after submission.
  • Avoid creating an HTTP receipt waiter from a fallback chain with no RPC URLs.
  • Add coverage for the fallback path that previously surfaced the post-submit RPC URL error.

Validation

  • pnpm --filter @openzeppelin/role-manager-app exec vitest run src/core/ecosystems/evm/tests/safeSignAndBroadcast.test.ts src/core/ecosystems/evm/tests/EvmAccessManagerService.test.ts
  • pnpm --filter @openzeppelin/role-manager-app exec eslint src/core/ecosystems/evm/safeSignAndBroadcast.ts src/core/ecosystems/evm/tests/safeSignAndBroadcast.test.ts

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
role-manager Ready Ready Preview, Comment Apr 13, 2026 9:21am
role-manager-a74d Ready Ready Preview, Comment Apr 13, 2026 9:21am
role-manager-b9b9 Ready Ready Preview, Comment Apr 13, 2026 9:21am
role-manager-rotd Ready Ready Preview, Comment Apr 13, 2026 9:21am

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces unit tests for the wrapSignAndBroadcastForSafe function and refactors the sendViaDirectEoa implementation. The refactor removes the logic for waiting for transaction receipts and simplifies the viem imports. A review comment suggests improving test robustness by resetting the window.ethereum global in the beforeEach block to prevent potential state leakage between tests.

Comment on lines +30 to +36
beforeEach(() => {
vi.clearAllMocks();
Object.defineProperty(window, 'parent', {
configurable: true,
value: originalParent,
});
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The beforeEach block resets window.parent but does not reset window.ethereum. While afterEach handles the cleanup, it is generally safer to ensure a clean state for every test by resetting all global mocks and properties in beforeEach as well, to prevent potential state leakage between tests if an afterEach fails or during parallel execution.

  beforeEach(() => {
    vi.clearAllMocks();
    Object.defineProperty(window, 'parent', {
      configurable: true,
      value: originalParent,
    });
    Object.defineProperty(window, 'ethereum', {
      configurable: true,
      value: originalEthereum,
    });
  });

@TuDo1403 TuDo1403 merged commit ba6786d into main Apr 13, 2026
5 of 9 checks passed
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