Skip to content

Conversation

@petar-omni
Copy link
Collaborator

@petar-omni petar-omni commented Nov 25, 2025

This pull request introduces TON blockchain support to the StakeKit widget by adding a TonConnect wallet connector. The main changes include new dependencies for TON, implementation of the TonConnect connector logic, updates to transaction types, and integration into the widget's configuration and wallet provider. This enables users to connect and sign TON transactions via TonConnect within the widget.

TON Integration

  • Added new TON dependencies (@ton/core, @tonconnect/ui and related packages) to both package.json and pnpm-lock.yaml to support TonConnect functionality. [1] [2] [3] [4] [5] [6] [7] [8]
  • Implemented ton-connector.ts to provide a TonConnect wallet connector, including transaction signing, connection, disconnection, and account management logic.
  • Added TON connector metadata and type guards in ton-connector-meta.ts.
  • Updated transaction types to support TonConnect transactions and parsing.

Widget Integration

  • Integrated TON connector into the widget's configuration and wallet provider, including support for a tonConnectManifestUrl setting, and added TON-specific logic to the wallet provider for transaction signing. [1] [2] [3] [4] [5] [6] [7] [8] [9]

Changelog

  • Added a patch changelog entry for the TON connector feature.

@changeset-bot
Copy link

changeset-bot bot commented Nov 25, 2025

🦋 Changeset detected

Latest commit: d94a757

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

This PR includes changesets to release 1 package
Name Type
@stakekit/widget 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

@vercel
Copy link

vercel bot commented Nov 25, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
dashboard-finery Ready Ready Preview Comment Nov 26, 2025 2:30pm
dashboard-utila Ready Ready Preview Comment Nov 26, 2025 2:30pm
staging-widget Ready Ready Preview Comment Nov 26, 2025 2:30pm
stakekit-widget Ready Ready Preview Comment Nov 26, 2025 2:30pm

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

This pull request introduces TON blockchain support through a new TonConnect-based connector and migrates the test infrastructure from jsdom to browser-based testing using Vitest's browser mode with Playwright.

Key Changes:

  • Implementation of TON connector using TonConnect UI library with transaction signing capabilities
  • Migration from jsdom/MSW node to browser-based testing with MSW browser and Vitest browser mode
  • Refactoring of connector storage mechanisms from custom localStorage service to Wagmi's native storage API across all connectors (Substrate, Solana, Tron, Cardano, Safe, external providers)
  • Dependency updates including React 19.2, Vitest 4.0, and related testing libraries

Reviewed changes

Copilot reviewed 56 out of 57 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/widget/src/providers/misc/ton-connector.ts New TON blockchain connector implementation using TonConnect UI
packages/widget/src/providers/misc/ton-connector-meta.ts Type definitions and metadata for TON connector
packages/widget/src/providers/sk-wallet/index.tsx Integration of TON connector with transaction signing flow
packages/widget/tests/mocks/worker.ts Migration from MSW node server to MSW browser worker
packages/widget/tests/utils/test-utils.tsx Updated to use vitest-browser-react instead of @testing-library/react
packages/widget/tests/utils/setup.ts Simplified browser test setup removing jsdom-specific polyfills
packages/widget/tests/fixtures/index.ts New centralized test fixture functions replacing scattered mock usage
packages/widget/vite/vite.config.base.ts Configured Vitest browser mode with Playwright provider
packages/widget/src/providers/[substrate/solana/tron/cardano]/connector.ts Migrated storage from custom localStorage to Wagmi storage API
packages/widget/src/services/local-storage.ts Removed connector-specific storage keys now handled by Wagmi
packages/widget/src/providers/virtual-scroll/index.tsx Removed test-specific virtual scroll provider
packages/widget/package.json Updated dependencies including React, Vitest, testing libraries, and added TON packages
.github/workflows/ci.yml Added Playwright installation step for browser-based tests

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Philippoes
Philippoes previously approved these changes Nov 25, 2025
Copy link
Contributor

@jdomingos jdomingos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Nice work

@petar-omni petar-omni merged commit 6ddc7db into main Nov 27, 2025
9 checks passed
@petar-omni petar-omni deleted the feat/ton-connector branch November 27, 2025 10:07
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.

4 participants