Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Comments

fix(core): support HlEvm/Strk transfer API responses#454

Open
r-near wants to merge 2 commits intomain from
fix/core-support-hlevm-strk-api
Open

fix(core): support HlEvm/Strk transfer API responses #454
r-near wants to merge 2 commits intomain from
fix/core-support-hlevm-strk-api

Conversation

@r-near
Copy link
Collaborator

@r-near r-near commented Feb 15, 2026
edited
Loading

Summary

  • extend core API Chain parsing to accept the new HlEvm and Strk origin_chain values returned by bridge-indexer
  • add Starknet transaction variant parsing (Starknet) so transfer payload validation succeeds with the updated API schema
  • add API tests covering new chain enums and Starknet transfer payloads

Validation

  • bun run test packages/core/
  • bun run typecheck

Related to https://github.com/Near-One/bridge-indexer-rs/pull/306

Copilot AI review requested due to automatic review settings February 15, 2026 17:46
@r-near r-near requested review from a team as code owners February 15, 2026 17:46
Copy link

changeset-bot bot commented Feb 15, 2026
edited
Loading

🦋 Changeset detected

Latest commit: 6060744

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@omni-bridge/core Patch
@omni-bridge/btc Patch
@omni-bridge/sdk Patch
@omni-bridge/solana Patch
@omni-bridge/evm Patch
@omni-bridge/near Patch

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

Copy link
Contributor

Copilot AI left a 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 ChainSchema to include HlEvm and Strk.
  • Add Starknet as a supported TransactionSchema variant 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.

Comment on lines +143 to +146
it("should accept new chain enums", async () => {
const status = await api.getTransferStatus({ originChain: "HlEvm", originNonce: 123 })
expect(status).toEqual(["Initialized"])
})
Copy link

Copilot AI Feb 15, 2026

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).

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot Copilot left review comments

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /