Skip to content

Svelte5 rewrite#2

Merged
brenzi merged 10 commits intomainfrom
svelte5-rewrite
Feb 20, 2026
Merged

Svelte5 rewrite#2
brenzi merged 10 commits intomainfrom
svelte5-rewrite

Conversation

@brenzi
Copy link
Copy Markdown
Member

@brenzi brenzi commented Feb 20, 2026

No description provided.

encointer-agent and others added 10 commits February 20, 2026 13:40
Replace the gutted ParaSpell playground fork with a purpose-built
XCM transfer tool. New stack: Svelte 5 (runes), Vite 6, polkadot-api
(PAPI) with smoldot light client, @paraspell/sdk v12.

Supports 3 chains (Encointer, Asset Hub Kusama, Asset Hub Polkadot),
2 tokens (KSM, USDC), and 8 transfer routes including multi-hop
cross-relay transfers. User-selectable smoldot or RPC provider.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adapt ci.yml and deploy.yml to use pnpm, svelte-check, vitest,
and vite build instead of the old React toolchain.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CI failed because pnpm/action-setup@v4 requires either a "version"
input or "packageManager" in package.json to determine the pnpm version.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The previous import `polkadot-api/smoldot/worker?worker` was wrong —
that module IS the worker script, so Vite's ?worker suffix double-wrapped
it causing SIGBUS/SIGTRAP. Use a thin wrapper file that Vite can bundle
as a proper Web Worker.

Default to RPC mode since smoldot requires COOP/COEP headers that
GitHub Pages doesn't provide.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ParaSpell has 3 USDC definitions for AssetHubKusama. The symbol-based
lookup resolved to assetId 10 (wrong one). Use explicit multilocation
for the bridged-from-PAH USDC: {parents:2, X4:[GlobalConsensus:Polkadot,
Parachain:1000, PalletInstance:50, GeneralIndex:1337]}.

Add per-chain currency spec to token config so balance queries and
transfer builder calls use the correct asset identifier.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
USDC on Polkadot Asset Hub is native pallet-assets ID 1337.
Avoid relying on ParaSpell symbol lookup which may resolve to
a different USDC variant.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ParaSpell throws DuplicateAssetError when multiple assets match a
symbol. KSM on KAH needs Native('KSM') (native vs foreign KSM),
KSM on PAH needs Foreign('KSM') (DOT is native there).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
XCM fees are denominated in the fee asset (usually KSM), not the
transfer token. Extract symbol and decimals from the fee result's
asset field and display each fee in its own denomination.

Remove incorrect fee subtraction from transfer amount for non-native
token transfers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use AssetConversionApi.quote_price_exact_tokens_for_tokens on KAH
to convert KSM-denominated XCM fees to USDC equivalent. Shown in
parentheses next to the KSM fee amount.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- CSS spinner component (.spinner, .spinner-sm, .spinner-lg)
- Balance auto-refresh via finalizedBlock$ subscription instead of
  polling timer; refetches per-chain on each finalized block
- Spinner during fee estimation and wallet signing
- Spinner in HomeView while balances loading
- KAH<>PAH transfers: show "Funds are being bridged and will arrive
  at the destination in ~6 minutes" instead of "Transfer complete"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@brenzi brenzi merged commit 5754658 into main Feb 20, 2026
1 check 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.

2 participants