-
Notifications
You must be signed in to change notification settings - Fork 27
test: revive and harden E2E test suite for simulator #622
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Fix EIP712 integer type handling with proper bit-width calculation - Enhance BigInt precision preservation in ethereum.ts - Improve parseGenericSigningResponse with digest support and better offset tracking - Add computeMessageHash helper for robust hash computation - Fix test descriptions and error message expectations - Better two's complement handling for signed integers These changes improve the reliability of EIP712 message signing and generic signing operations, particularly for large integer values.
- Change test('pair') to beforeAll() for proper test setup
- Ensures client is initialized before running Bitcoin tests
- Prevents test isolation issues with client setup
Coerce hex nonce values and default empty data so legacy transaction payloads continue to parse after the viem schema tightenings. Also bounds the kv cleanup helper in the e2e test to avoid reissuing the same getKvRecords request indefinitely.
- Allow sign to accept pre-serialized hex/buffer payloads while preserving EIP-7702 encoding detection and decoder enrichment - Auto-detect EIP-712 message payloads in signMessage so callers only supply the typed data structure - Stabilise API e2e tests by mocking decoder calls, suppressing noisy logs, reusing the paired client, and exercising address-tag flows against the simulator after a connectivity probe
- Add forge CLI availability check to conditionally skip tests - Replace static import with dynamic artifact loading from forge output - Improve error handling and logging for missing forge dependencies - Make contract tests more robust in CI environments
- Add xpub test for Bitcoin extended public key derivation - Refactor test setup to use beforeAll for consistent pairing - Skip SafeCard-dependent tests in CI environment - Remove redundant pairing checks from wallet-jobs tests
Add explicit type annotations for encodingType variable to include EIP7702 encoding types and add type assertion for basePayload to improve type safety and IDE support.
commit: |
netbonus
reviewed
Oct 29, 2025
Remove CI skip condition to allow the test to run in continuous integration environments.
Move signature validation utilities from non-exportable.test.ts to helpers.ts to improve code reusability and reduce duplication. Changes: - Extract toBuffer, toUint8Array, ensureHash32, and validateSig to helpers.ts - Enhance validateSig to properly handle compressed/uncompressed public keys - Remove duplicate helper functions from test file - Update imports to use shared utilities
netbonus
approved these changes
Oct 29, 2025
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR revives the stale E2E test suite and hardens it to run reliably with the Lattice simulator.
Key Changes
beforeAllfor consistent client pairingTesting
All E2E tests now pass with the simulator.