Skip to content

feat(frontend): implement OneSec services#12623

Merged
DenysKarmazynDFINITY merged 1 commit intomainfrom
feat(frontend)/onesec-services
Apr 28, 2026
Merged

feat(frontend): implement OneSec services#12623
DenysKarmazynDFINITY merged 1 commit intomainfrom
feat(frontend)/onesec-services

Conversation

@DenysKarmazynDFINITY
Copy link
Copy Markdown
Contributor

Motivation

  • Adds onesec-swap.services.ts with four exported functions that wrap the onesec-bridge SDK: fetchOneSecEvmToIcpQuote, fetchOneSecIcpToEvmQuote, executeOneSecIcpToEvmBridge,
    and executeOneSecEvmToIcpBridge
  • Quote functions share a private resolveQuoteFromPlan helper that runs the plan's fee-check step and maps the result to SwapMappedResult
  • EVM → ICP execution uses the forwarding address pattern: build plan → run fee step → retrieve deterministic forwarding address → send EVM tokens via OISY's send service →
    run remaining SDK steps (notify, validate, wait for ICP tx)
  • ICP → EVM execution runs all SDK steps sequentially, keeping the UI at INITIALIZATION for step 0 (fee check) and advancing to SWAP for steps 1+
  • Adds a full Vitest suite (27 tests) covering guard conditions, both quote directions, both execution paths, progress reporting order, and all failure branches including setFailedProgressStep callbacks

Copilot AI review requested due to automatic review settings April 28, 2026 07:50
@DenysKarmazynDFINITY DenysKarmazynDFINITY requested a review from a team as a code owner April 28, 2026 07:50
@DenysKarmazynDFINITY DenysKarmazynDFINITY force-pushed the feat(frontend)/onesec-services branch from ee08970 to f55bcd7 Compare April 28, 2026 08:27
@DenysKarmazynDFINITY DenysKarmazynDFINITY force-pushed the feat(frontend)/onesec-services branch from f55bcd7 to 2750802 Compare April 28, 2026 08:37
@DenysKarmazynDFINITY DenysKarmazynDFINITY added this pull request to the merge queue Apr 28, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 28, 2026
@DenysKarmazynDFINITY DenysKarmazynDFINITY added this pull request to the merge queue Apr 28, 2026
Merged via the queue into main with commit 6d49f1b Apr 28, 2026
80 checks passed
@DenysKarmazynDFINITY DenysKarmazynDFINITY deleted the feat(frontend)/onesec-services branch April 28, 2026 09:28
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.

2 participants