Skip to content

Feature/ton 1651 fix intents#111

Merged
TrueCarry merged 4 commits into
mainfrom
feature/ton-1651-fix-intents
Jun 12, 2026
Merged

Feature/ton 1651 fix intents#111
TrueCarry merged 4 commits into
mainfrom
feature/ton-1651-fix-intents

Conversation

@nikdim03

@nikdim03 nikdim03 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Added support for embedded requests in wallet kit initialization.
  • Improvements

    • Connect request approve button now displays a loading state while processing.
  • Bug Fixes

    • Fixed JSON serialization to properly include discriminator fields in encoded data.

@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 669a2fcb-1f11-44f4-850d-2c986e5b4ac3

📥 Commits

Reviewing files that changed from the base of the PR and between 0f1d4d9 and 8bb0042.

⛔ Files ignored due to path filters (2)
  • TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONSwapParams.kt is excluded by !**/generated/**
  • TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONSwapQuoteParams.kt is excluded by !**/generated/**
📒 Files selected for processing (1)
  • AndroidDemo/app/src/main/java/io/ton/walletkit/demo/core/WalletKitDemoApp.kt

📝 Walkthrough

Walkthrough

The PR adds support for embedded requests to the wallet kit SDK by introducing a new EmbeddedRequestFeature configuration, wires it into SDK initialization with conditional feature descriptor inclusion, prevents accidental double-taps on the connect request approve button with request-keyed loading state, and fixes discriminated union JSON serialization to include discriminator fields.

Changes

Embedded Request Feature and Safety Improvements

Layer / File(s) Summary
Embedded Request Feature Definition
TONWalletKit-Android/api/src/main/java/io/ton/walletkit/config/TONWalletKitConfiguration.kt, TONWalletKit-Android/impl/src/main/java/io/ton/walletkit/internal/constants/JsonConstants.kt
EmbeddedRequestFeature is introduced as a new serializable singleton Feature, paired with the JSON constant FEATURE_EMBEDDED_REQUEST = "EmbeddedRequest" for TonConnect identification.
Embedded Request Feature Initialization and Demo Integration
TONWalletKit-Android/impl/src/main/java/io/ton/walletkit/engine/infrastructure/InitializationManager.kt, AndroidDemo/app/src/main/java/io/ton/walletkit/demo/core/WalletKitDemoApp.kt
InitializationManager conditionally appends FEATURE_EMBEDDED_REQUEST to the init payload's features array when EmbeddedRequestFeature is in featuresToUse, and the demo app enables the feature in its configuration.
Connect Request Double-tap Prevention
AndroidDemo/app/src/main/java/io/ton/walletkit/demo/presentation/ui/sheet/ConnectRequestSheet.kt
The approve button now tracks an approving state keyed to the current request, becoming disabled and displaying a loading variant while approval is in progress to prevent duplicate submissions.
Discriminated Union Serialization
Scripts/generate-api/templates/modelDiscriminatedUnion.mustache
Generated serializers for interface unions now explicitly merge the discriminator field into the JSON object alongside the associated value, ensuring discriminator presence during encoding.

🎯 2 (Simple) | ⏱️ ~10 minutes

🐰 A feature hops into the SDK with grace so fine,
Double-taps now pause with safety's design,
Unions serialize their fields complete,
Making your requests oh so neat!
bounces approving

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The PR title 'Feature/ton 1651 fix intents' is vague and does not clearly describe the actual changes made. The changeset adds embedded request feature support and fixes in swap/connect logic, but 'fix intents' does not convey these specific improvements. Revise the title to clearly describe the main changes, such as 'Add EmbeddedRequestFeature support to TONWalletKit' or 'Implement embedded request feature and improve connect/swap handling'.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/ton-1651-fix-intents

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.

@TrueCarry TrueCarry merged commit f69fcd4 into main Jun 12, 2026
1 check was pending
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