Skip to content

feat: enable TON chain and Stonfi swapper#11842

Merged
gomesalexandre merged 10 commits intodevelopfrom
enable-ton-stonfi
Feb 18, 2026
Merged

feat: enable TON chain and Stonfi swapper#11842
gomesalexandre merged 10 commits intodevelopfrom
enable-ton-stonfi

Conversation

@NeOMakinG
Copy link
Collaborator

@NeOMakinG NeOMakinG commented Feb 12, 2026

Description

Stacked on top of #11889

Enables TON blockchain support and Stonfi swapper across the application by activating feature flags in .env.

This PR builds on top of #11841 (referral fee implementation) and activates the TON chain and Stonfi swapper features.

Changes:

  • Remove VITE_FEATURE_TON from .env.development
  • Remove VITE_FEATURE_STONFI_SWAP from .env.development
  • Enable VITE_FEATURE_TON=true in .env
  • Enable VITE_FEATURE_STONFI_SWAP=true in .env

What This Enables:

Issue (if applicable)

Depends on #11841

Risk

Low Risk

  • Feature flags enable existing, tested functionality
  • TON support has been available behind feature flags
  • Stonfi integration has been tested in development
  • Can be quickly disabled by reverting these flag changes

What protocols, transaction types, wallets or contract interactions might be affected by this PR?

  • Protocol: TON blockchain, Stonfi DEX
  • Transaction Types: TON native transfers, TON jetton swaps via Stonfi
  • Wallets: TON-compatible wallets (Tonkeeper, etc.)
  • Affected Users: All users will see TON chain and Stonfi swapper options

Testing

Engineering

Prerequisites:

Test Cases:

  1. TON Chain Visibility:

    • Verify TON appears in chain selector
    • Check TON assets are displayed correctly
    • Test TON wallet connection flows
  2. Stonfi Swapper:

    • Request swap quotes for TON pairs
    • Verify Stonfi appears as a swap route option
    • Test swap execution with real transactions
    • Confirm referral fees are included in swaps
  3. Feature Flag Behavior:

    • Verify flags are enabled in production .env
    • Confirm flags removed from .env.development use config defaults

Operations

  • 🏁 My feature is behind a flag and doesn't require operations testing (yet)

Testing Required:
Once merged, operations should test:

  • TON wallet connection and disconnection
  • TON asset display and balance accuracy
  • Stonfi swap quotes and execution
  • Fee transparency in UI
  • Error handling for failed swaps
  • Cross-browser compatibility

Rollback Plan:
If issues arise, disable features by setting:

VITE_FEATURE_TON=false
VITE_FEATURE_STONFI_SWAP=false

Screenshots (if applicable)

N/A - Flag activation only


🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Enabled TON blockchain integration
    • Enabled STONFI swap functionality

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 12, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Environment configuration files are updated to enable TON and STONFI_SWAP features in production, while removing these feature flags from the development environment configuration.

Changes

Cohort / File(s) Summary
Feature Flag Configuration
.env, .env.development
Production environment enables VITE_FEATURE_TON and VITE_FEATURE_STONFI_SWAP flags, while development environment removes these same flags, reversing their previous enabled state.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • fix: bring back jettons #11889: Conditionally includes tonChainId based on VITE_FEATURE_TON flag status, directly related to the TON feature enablement in this PR.

Suggested reviewers

  • gomesalexandre
  • premiumjibles

Poem

🐰✨ A hop and a skip through the config we go,
TON and STONFI ready to flow!
Production shines bright, while dev takes a rest,
Feature flags dancing—which env is best? 🌟

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: enabling TON chain and Stonfi swapper features via feature flags.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch enable-ton-stonfi

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@NeOMakinG NeOMakinG marked this pull request as ready for review February 12, 2026 18:16
@NeOMakinG NeOMakinG requested a review from a team as a code owner February 12, 2026 18:16
@gomesalexandre gomesalexandre self-requested a review February 16, 2026 11:13
Copy link
Contributor

@gomesalexandre gomesalexandre left a comment

Choose a reason for hiding this comment

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

Disregard me, multitask done wrong

@gomesalexandre gomesalexandre self-requested a review February 16, 2026 11:23
@gomesalexandre gomesalexandre marked this pull request as draft February 16, 2026 11:28
@gomesalexandre gomesalexandre changed the base branch from stonfi-ref to develop February 16, 2026 11:59
@gomesalexandre gomesalexandre marked this pull request as ready for review February 16, 2026 12:14
Copy link
Contributor

@gomesalexandre gomesalexandre left a comment

Choose a reason for hiding this comment

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

Not sure about this in this state - we're missing ton assets in ton chain dropdown - including when searching https://jam.dev/c/3303821a-f6bf-4867-ad09-f9210b3e75d0

Image

Taking a look into it now

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@packages/utils/src/treasury.ts`:
- Line 42: The constant DAO_TREASURY_TON is set to the placeholder 'REPLACE_ME',
which will be returned by getTreasuryAddressFromChainId and used as
referrerAddress in Stonfi requests; replace the placeholder with the actual DAO
treasury TON address (the real TON wallet string confirmed in PR `#11841`) in the
DAO_TREASURY_TON export and verify getTreasuryAddressFromChainId resolves TON to
that value when VITE_FEATURE_TON and VITE_FEATURE_STONFI_SWAP are enabled so no
requests send the placeholder referrer.

gomes-bot and others added 6 commits February 16, 2026 14:29
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Enables TON blockchain support and Stonfi swapper by moving feature flags from .env.development to .env:
- Remove VITE_FEATURE_TON from .env.development
- Remove VITE_FEATURE_STONFI_SWAP from .env.development
- Enable VITE_FEATURE_TON=true in .env
- Enable VITE_FEATURE_STONFI_SWAP=true in .env

This activates:
- TON blockchain support across the application
- Stonfi DEX integration for TON swaps
- Referral fee collection for ShapeShift DAO treasury

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.env:
- Around line 312-313: Reorder the two dotenv keys so they follow
dotenv-linter's alphabetical ordering: place VITE_FEATURE_STONFI_SWAP before
VITE_FEATURE_TON in the .env entries; ensure no extra whitespace or duplicate
keys are introduced when swapping the lines.

@gomesalexandre
Copy link
Contributor

FYI @NeOMakinG - stacked on top of #11889

@gomesalexandre gomesalexandre marked this pull request as draft February 16, 2026 15:50
Copy link
Contributor

@gomesalexandre gomesalexandre left a comment

Choose a reason for hiding this comment

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

Happy with this whenever base gets in
Also fixed both Jetton transfers in #11896 and failures in #11897 - should probably get at least the first one in release as well

Tested:

  • TON sends ✅
  • Jetton sends 🚫
  • Jetton <-> Jetton swaps ✅
  • TON <-> Jetton swaps ✅
  • Second-class Tx history ✅
  • Second-class balance updates ✅
  • Portfolio fetching ✅
  • Multi-account ✅

Things worth nothing here:

@NeOMakinG NeOMakinG marked this pull request as ready for review February 18, 2026 09:57
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In @.env:
- Around line 314-315: The UnorderedKey warning for the environment keys
VITE_FEATURE_STONFI_SWAP and VITE_FEATURE_TON is a false-positive per project
convention (alphabetical ordering is not required); either leave the keys as-is
or disable that rule in the dotenv-linter config by turning off UnorderedKey
(e.g., in your dotenv-linter config file) so the linter no longer flags
VITE_FEATURE_STONFI_SWAP and VITE_FEATURE_TON as an issue.

@gomesalexandre gomesalexandre enabled auto-merge (squash) February 18, 2026 10:43
@gomesalexandre gomesalexandre merged commit cbe0fc4 into develop Feb 18, 2026
4 checks passed
@gomesalexandre gomesalexandre deleted the enable-ton-stonfi branch February 18, 2026 10:54
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