-
Notifications
You must be signed in to change notification settings - Fork 4
Comments
fix(core): support HlEvm/Strk transfer API responses#454
fix(core): support HlEvm/Strk transfer API responses #454
Conversation
🦋 Changeset detectedLatest commit: 6060744 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Updates the packages/core BridgeAPI Zod response parsing to accept new origin_chain values (HlEvm, Strk) and to validate Starknet transaction payload variants returned by the backend, with accompanying API-client tests.
Changes:
- Extend
ChainSchemato includeHlEvmandStrk. - Add
Starknetas a supportedTransactionSchemavariant with strict "exactly one variant" validation. - Add tests for Starknet transfer payload parsing and attempted coverage for new chain enums.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
packages/core/src/api.ts |
Expands chain enum parsing and adds Starknet transaction schema support in transfer validation. |
packages/core/tests/api.test.ts |
Adds a Starknet transfer fixture/test and a test intended to cover new chain enums. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Copilot
AI
Feb 15, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new test "should accept new chain enums" doesn’t actually exercise the updated ChainSchema parsing: getTransferStatus only validates the response against TransferStatusSchema, and originChain is only a TypeScript type (no runtime validation). To cover the intended behavior, add/adjust a test that validates response parsing with origin_chain: "HlEvm" (e.g., mock getTransfer/findTransfers returning a transfer whose id.origin_chain is "HlEvm" and assert it parses successfully).
Uh oh!
There was an error while loading. Please reload this page.
Summary
Chainparsing to accept the newHlEvmandStrkorigin_chainvalues returned by bridge-indexerStarknet) so transfer payload validation succeeds with the updated API schemaValidation
bun run test packages/core/bun run typecheckRelated to https://github.com/Near-One/bridge-indexer-rs/pull/306