feat: implement gasless transaction support#114
Conversation
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds a gasless relay provider API and USDT multi-currency send to the Android WalletKit SDK and demo app. The ChangesGasless and currency-aware transaction flow
Sequence DiagramsequenceDiagram
participant SendTransactionScreen
participant WalletOperationsViewModel
participant ITONGaslessManager
participant ITONWallet
rect rgba(100, 180, 255, 0.5)
note over SendTransactionScreen,WalletOperationsViewModel: USDT + gasless=true path
end
SendTransactionScreen->>WalletOperationsViewModel: onSend(recipient, amount, USDT, gasless=true)
WalletOperationsViewModel->>ITONGaslessManager: registerProvider / setDefaultProvider
WalletOperationsViewModel->>ITONGaslessManager: getConfig() → responseDestination
WalletOperationsViewModel->>ITONGaslessManager: getQuote(TONGaslessQuoteParams) → quote
WalletOperationsViewModel->>ITONWallet: signedSignMessage(quote.messages, validUntil) → TONBase64
WalletOperationsViewModel->>ITONGaslessManager: sendTransaction(TONGaslessSendParams) → response
WalletOperationsViewModel-->>SendTransactionScreen: success/error state
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Suggested reviewers
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (2)
TONWalletKit-Android/impl/src/main/java/io/ton/walletkit/core/TONWalletKit.kt (1)
494-495: ⚡ Quick winGuard
gasless()with lifecycle check.
gasless()currently skipscheckNotDestroyed(), so callers can obtain a manager from a destroyed kit instance and only fail later in deeper engine calls.Suggested patch
- override suspend fun gasless(): ITONGaslessManager = gaslessManager + override suspend fun gasless(): ITONGaslessManager { + checkNotDestroyed() + return gaslessManager + }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@TONWalletKit-Android/impl/src/main/java/io/ton/walletkit/core/TONWalletKit.kt` around lines 494 - 495, The gasless() accessor in TONWalletKit returns gaslessManager without ensuring the kit isn't destroyed; add a lifecycle guard by invoking checkNotDestroyed() at the start of the override suspend fun gasless() before returning gaslessManager so callers cannot obtain the manager from a destroyed TONWalletKit instance.AndroidDemo/app/src/main/java/io/ton/walletkit/demo/presentation/actions/WalletActions.kt (1)
33-33: ⚡ Quick winDecouple action contracts from the ViewModel package.
WalletActionsnow importsSendCurrencyfrompresentation.viewmodel, which couples this interface to an implementation-oriented package. Please moveSendCurrencyto a neutral contract/model location (e.g.,presentation.model) and update imports in actions/UI/viewmodels.Also applies to: 73-80
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@AndroidDemo/app/src/main/java/io/ton/walletkit/demo/presentation/actions/WalletActions.kt` at line 33, Move the SendCurrency type out of the implementation-specific presentation.viewmodel package into a neutral contract package (e.g., presentation.model) and update all imports that reference it: change import occurrences in WalletActions (symbol: WalletActions) and in the UI and viewmodel files mentioned (symbols: any ViewModel classes or UI components that import SendCurrency) to the new package; ensure the SendCurrency file/class is relocated (or re-exported) under presentation.model and update package declarations so compilation and CI import resolution succeed.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@AndroidDemo/app/src/main/java/io/ton/walletkit/demo/presentation/ui/screen/SendTransactionScreen.kt`:
- Around line 184-212: The current UI hides the comment field whenever currency
== SendCurrency.USDT, which allows a stale comment to be submitted when
switching to a non-gasless USDT path; instead, show the comment input based on
the gasless flag. Update SendTransactionScreen.kt so the SendField for comment
is rendered when !gasless (regardless of SendCurrency), and keep the gasless
toggle only when currency == SendCurrency.USDT; ensure you reference the
existing gasless boolean, the SendField(component) and comment state, and that
WalletOperationsViewModel.kt continues to receive comment only from the
visible/comment-bound input.
In
`@AndroidDemo/app/src/main/java/io/ton/walletkit/demo/presentation/viewmodel/WalletOperationsViewModel.kt`:
- Around line 161-166: The gasless provider obtained via val provider =
walletKit().tonApiGaslessProvider() is registered and maybe set as default, but
subsequent calls to quote/send are not passing this resolved provider so
ITONGaslessManager may use a different default; update the code paths that call
the gasless quote and send methods (the calls that currently rely on the
manager's default) to pass the explicit provider variable instead (i.e., when
invoking the gasless manager's quote and send helpers, supply provider as the
provider argument) while keeping the existing
hasProvider/registerProvider/setDefaultProvider logic intact.
- Line 194: The current toUsdtRawUnits(amount: String) silently truncates
fractional USDT digits because toBigInteger() is used after shifting, so amounts
with more than USDT_DECIMALS are floored; change to validate and reject inputs
with scale > USDT_DECIMALS or use an exact conversion to fail fast: in
toUsdtRawUnits, create val bd = BigDecimal(amount), check bd.scale() <=
USDT_DECIMALS and bd > BigDecimal.ZERO, then return
bd.movePointRight(USDT_DECIMALS).toBigIntegerExact().toString() (or throw an
IllegalArgumentException with a clear message if the scale check fails) so
inputs with >6 decimals are rejected instead of truncated.
In
`@TONWalletKit-Android/impl/src/main/java/io/ton/walletkit/engine/operations/GaslessOperations.kt`:
- Around line 48-53: The createTonApiGaslessProvider function is using the
global Json encoder instead of the BridgeRpcClient's configured json; update the
call inside BridgeRpcClient.createTonApiGaslessProvider to use the client's
json.encodeToJsonElement(...) for serializing TONTonApiGaslessProviderConfig
(same style as the other gasless ops), i.e. replace
Json.encodeToJsonElement(...) with json.encodeToJsonElement(...) so the Bridge
payload uses the configured encoder on the BridgeRpcClient instance.
---
Nitpick comments:
In
`@AndroidDemo/app/src/main/java/io/ton/walletkit/demo/presentation/actions/WalletActions.kt`:
- Line 33: Move the SendCurrency type out of the implementation-specific
presentation.viewmodel package into a neutral contract package (e.g.,
presentation.model) and update all imports that reference it: change import
occurrences in WalletActions (symbol: WalletActions) and in the UI and viewmodel
files mentioned (symbols: any ViewModel classes or UI components that import
SendCurrency) to the new package; ensure the SendCurrency file/class is
relocated (or re-exported) under presentation.model and update package
declarations so compilation and CI import resolution succeed.
In
`@TONWalletKit-Android/impl/src/main/java/io/ton/walletkit/core/TONWalletKit.kt`:
- Around line 494-495: The gasless() accessor in TONWalletKit returns
gaslessManager without ensuring the kit isn't destroyed; add a lifecycle guard
by invoking checkNotDestroyed() at the start of the override suspend fun
gasless() before returning gaslessManager so callers cannot obtain the manager
from a destroyed TONWalletKit instance.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 13f7e042-ce8f-4d84-9c75-036f25e34238
⛔ Files ignored due to path filters (14)
TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONConnectionRequestEvent.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONDefiProviderType.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONGaslessConfig.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONGaslessProviderMetadata.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONGaslessProviderMetadataOverride.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONGaslessQuote.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONGaslessQuoteParams.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONGaslessSendParams.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONGaslessSendResponse.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONGaslessSupportedAsset.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONSwapParams.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONSwapQuoteParams.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONTonApiGaslessChainConfig.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONTonApiGaslessProviderConfig.ktis excluded by!**/generated/**
📒 Files selected for processing (24)
AndroidDemo/app/src/main/java/io/ton/walletkit/demo/presentation/actions/WalletActions.ktAndroidDemo/app/src/main/java/io/ton/walletkit/demo/presentation/actions/WalletActionsImpl.ktAndroidDemo/app/src/main/java/io/ton/walletkit/demo/presentation/ui/screen/LegacyWalletScreen.ktAndroidDemo/app/src/main/java/io/ton/walletkit/demo/presentation/ui/screen/SendTransactionScreen.ktAndroidDemo/app/src/main/java/io/ton/walletkit/demo/presentation/ui/screen/WalletScreen.ktAndroidDemo/app/src/main/java/io/ton/walletkit/demo/presentation/viewmodel/SwapViewModel.ktAndroidDemo/app/src/main/java/io/ton/walletkit/demo/presentation/viewmodel/WalletKitViewModel.ktAndroidDemo/app/src/main/java/io/ton/walletkit/demo/presentation/viewmodel/WalletOperationsViewModel.ktTONWalletKit-Android/api/src/main/java/io/ton/walletkit/ITONWallet.ktTONWalletKit-Android/api/src/main/java/io/ton/walletkit/ITONWalletKit.ktTONWalletKit-Android/api/src/main/java/io/ton/walletkit/gasless/ITONGaslessManager.ktTONWalletKit-Android/api/src/main/java/io/ton/walletkit/gasless/TONGaslessProvider.ktTONWalletKit-Android/impl/src/main/assets/walletkit/walletkit-android-bridge.mjsTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/core/TONWallet.ktTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/core/TONWalletKit.ktTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/engine/WalletKitEngine.ktTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/engine/WebViewWalletKitEngine.ktTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/engine/operations/GaslessOperations.ktTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/engine/operations/WalletOperations.ktTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/engine/operations/requests/GaslessRequests.ktTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/engine/operations/requests/WalletRequests.ktTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/gasless/TONGaslessManager.ktTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/internal/constants/BridgeMethodConstants.ktTONWalletKit-Android/impl/src/test/java/io/ton/walletkit/engine/operations/SwapOperationsTest.kt
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
TONWalletKit-Android/api/src/main/java/io/ton/walletkit/ITONWallet.kt (1)
51-52:⚠️ Potential issue | 🟠 MajorRemove the duplicate
val networkproperty fromITONWallet.
TONWalletAdapteralready definesfun network(): TONNetwork, andITONWalletduplicates this by addingval network: TONNetwork. Implementations must satisfy both surfaces, creating two paths to the same value and risking divergence. Use the single adapter method and remove the property from the interface.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@TONWalletKit-Android/api/src/main/java/io/ton/walletkit/ITONWallet.kt` around lines 51 - 52, Remove the duplicate val network property from the ITONWallet interface (lines 51-52). Since TONWalletAdapter already provides the same functionality through the fun network(): TONNetwork method, having both creates redundancy and potential inconsistency between implementations. Delete the network property definition entirely from ITONWallet to maintain a single source of truth for this value.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@TONWalletKit-Android/api/src/main/java/io/ton/walletkit/gasless/ITONGaslessManager.kt`:
- Around line 59-60: The `provider()` method in the ITONGaslessManager interface
is declared with a nullable return type (ITONGaslessProvider?) but the actual
implementation in TONGaslessManager always returns a provider and never null,
creating a contract mismatch. Choose one approach: (1) update the implementation
of the `provider()` method to return null when the provider with the given
TONGaslessProviderIdentifier is not registered, ensuring the nullable return
type matches actual behavior, or (2) change the return type of `provider()` in
both the interface and implementation from nullable to non-nullable
(ITONGaslessProvider) and add documentation to the method stating that callers
should use `hasProvider()` to validate provider registration before calling this
method. Ensure consistency between the interface contract and implementation
behavior.
In `@TONWalletKit-Android/impl/src/main/java/io/ton/walletkit/core/TONWallet.kt`:
- Around line 244-248: The fakeSignature parameter in the signedSignMessage
function is accepted but not passed to the engine call, making fake-signature
mode unreachable. Update the signedSignMessage method to pass the fakeSignature
parameter to engine.getSignedSignMessage(). Then propagate this parameter
through the entire call chain by adding fakeSignature to the method signatures
of WalletKitEngine.getSignedSignMessage(),
WebViewWalletKitEngine.getSignedSignMessage(), and
BridgeRpcClient.getSignedSignMessage(). Also add the fakeSignature field to
GetSignedSignMessageRequest and ensure the matching JS bridge handler receives
and processes this parameter.
---
Outside diff comments:
In `@TONWalletKit-Android/api/src/main/java/io/ton/walletkit/ITONWallet.kt`:
- Around line 51-52: Remove the duplicate val network property from the
ITONWallet interface (lines 51-52). Since TONWalletAdapter already provides the
same functionality through the fun network(): TONNetwork method, having both
creates redundancy and potential inconsistency between implementations. Delete
the network property definition entirely from ITONWallet to maintain a single
source of truth for this value.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 1bfbfccc-5f30-4805-b899-a0204f0da7dc
⛔ Files ignored due to path filters (36)
TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONAccountState.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONConnectionApprovalProof.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONEmulationMessageContent.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONGaslessConfig.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONGaslessProviderMetadata.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONGaslessProviderMetadataOverride.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONGaslessQuote.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONGaslessQuoteParams.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONGaslessSendParams.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONGaslessSendResponse.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONGaslessSupportedAsset.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONJettonTransferItem.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONJettonsTransferRequest.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONNFTRawTransferRequestMessage.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONNftTransferItem.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONProofMessage.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONSendTransactionApprovalResponse.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONSendTransactionResponse.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONSignDataBinary.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONSignDataCell.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONSignDataPreviewBinary.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONSignDataPreviewCell.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONSignMessageApprovalResponse.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONStakingProviderInfo.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONStakingProviderMetadata.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONStakingQuoteParams.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONStakingTokenInfo.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONSwapParams.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONSwapQuoteParams.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONTokenInfo.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONTonApiGaslessChainConfig.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONTonApiGaslessProviderConfig.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONTonTransferItem.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONTransactionMessageContent.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONTransactionRequestMessage.ktis excluded by!**/generated/**TONWalletKit-Android/api/src/main/java/io/ton/walletkit/api/generated/TONTransferRequest.ktis excluded by!**/generated/**
📒 Files selected for processing (22)
AndroidDemo/app/src/main/java/io/ton/walletkit/demo/presentation/viewmodel/WalletOperationsViewModel.ktTONWalletKit-Android/api/src/main/java/io/ton/walletkit/ITONWallet.ktTONWalletKit-Android/api/src/main/java/io/ton/walletkit/ITONWalletKit.ktTONWalletKit-Android/api/src/main/java/io/ton/walletkit/TONProviderType.ktTONWalletKit-Android/api/src/main/java/io/ton/walletkit/gasless/ITONGaslessManager.ktTONWalletKit-Android/api/src/main/java/io/ton/walletkit/gasless/ITONGaslessProvider.ktTONWalletKit-Android/api/src/main/java/io/ton/walletkit/gasless/TONGaslessProviderIdentifier.ktTONWalletKit-Android/api/src/main/java/io/ton/walletkit/gasless/tonapi/TONApiGaslessProviderIdentifier.ktTONWalletKit-Android/api/src/main/java/io/ton/walletkit/model/TONWalletAdapter.ktTONWalletKit-Android/impl/src/main/assets/walletkit/walletkit-android-bridge.mjsTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/core/TONWallet.ktTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/core/TONWalletKit.ktTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/engine/WalletKitEngine.ktTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/engine/WebViewWalletKitEngine.ktTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/engine/adapter/BridgeWalletAdapter.ktTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/engine/operations/WalletOperations.ktTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/engine/operations/requests/WalletRequests.ktTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/gasless/BuiltInGaslessProvider.ktTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/gasless/TONGaslessManager.ktTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/internal/constants/BridgeMethodConstants.ktTONWalletKit-Android/impl/src/test/java/io/ton/walletkit/CustomWalletAdapterTest.ktTONWalletKit-Android/impl/src/test/java/io/ton/walletkit/mockbridge/infra/MockScenario.kt
🚧 Files skipped from review as they are similar to previous changes (4)
- TONWalletKit-Android/impl/src/main/java/io/ton/walletkit/gasless/TONGaslessManager.kt
- TONWalletKit-Android/api/src/main/java/io/ton/walletkit/ITONWalletKit.kt
- AndroidDemo/app/src/main/java/io/ton/walletkit/demo/presentation/viewmodel/WalletOperationsViewModel.kt
- TONWalletKit-Android/impl/src/main/java/io/ton/walletkit/core/TONWalletKit.kt
7811a36 to
7cb8e82
Compare
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
TONWalletKit-Android/api/src/main/java/io/ton/walletkit/swap/ITONSwapProvider.kt (1)
37-38:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winFix stale KDoc reference after method rename.
KDoc still points to
[quote], but the interface now definesgetQuote. Please update the reference to avoid broken/incorrect API docs.🛠 Suggested fix
- * [TQuoteOptions] is the provider-specific options type for [quote]; + * [TQuoteOptions] is the provider-specific options type for [getQuote];🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@TONWalletKit-Android/api/src/main/java/io/ton/walletkit/swap/ITONSwapProvider.kt` around lines 37 - 38, The KDoc comment for the ITONSwapProvider interface contains a stale method reference. Update the documentation reference from [quote] to [getQuote] to match the actual method name in the interface. This will ensure the generated API documentation correctly links to the renamed method instead of a non-existent reference.TONWalletKit-Android/api/src/main/java/io/ton/walletkit/ITONWalletKit.kt (1)
227-227:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winUpdate stale KDoc method reference.
The docs still reference
ITONStakingManager.register, but the API now exposesregisterProvider. This leaves public docs inconsistent with the current interface.🛠 Suggested fix
- * Call [ITONStakingManager.register] with the returned provider to make it available for quotes. + * Call [ITONStakingManager.registerProvider] with the returned provider to make it available for quotes.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@TONWalletKit-Android/api/src/main/java/io/ton/walletkit/ITONWalletKit.kt` at line 227, Update the KDoc comment that references ITONStakingManager.register to instead reference registerProvider, which is the current method name exposed by the API. Replace the outdated method reference in the documentation with the correct method name to ensure consistency between the public docs and the actual interface implementation.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@TONWalletKit-Android/api/src/main/java/io/ton/walletkit/ITONWalletKit.kt`:
- Line 227: Update the KDoc comment that references ITONStakingManager.register
to instead reference registerProvider, which is the current method name exposed
by the API. Replace the outdated method reference in the documentation with the
correct method name to ensure consistency between the public docs and the actual
interface implementation.
In
`@TONWalletKit-Android/api/src/main/java/io/ton/walletkit/swap/ITONSwapProvider.kt`:
- Around line 37-38: The KDoc comment for the ITONSwapProvider interface
contains a stale method reference. Update the documentation reference from
[quote] to [getQuote] to match the actual method name in the interface. This
will ensure the generated API documentation correctly links to the renamed
method instead of a non-existent reference.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 9388dede-32e6-42b0-8039-cb48efdaa639
📒 Files selected for processing (45)
AndroidDemo/app/src/main/java/io/ton/walletkit/demo/core/WalletKitDemoApp.ktAndroidDemo/app/src/main/java/io/ton/walletkit/demo/presentation/ui/screen/NFTDetailsScreen.ktAndroidDemo/app/src/main/java/io/ton/walletkit/demo/presentation/ui/sheet/StakingSheet.ktAndroidDemo/app/src/main/java/io/ton/walletkit/demo/presentation/viewmodel/JettonsListViewModel.ktAndroidDemo/app/src/main/java/io/ton/walletkit/demo/presentation/viewmodel/NFTsListViewModel.ktAndroidDemo/app/src/main/java/io/ton/walletkit/demo/presentation/viewmodel/SessionsViewModel.ktAndroidDemo/app/src/main/java/io/ton/walletkit/demo/presentation/viewmodel/StakingViewModel.ktAndroidDemo/app/src/main/java/io/ton/walletkit/demo/presentation/viewmodel/SwapViewModel.ktAndroidDemo/app/src/main/java/io/ton/walletkit/demo/presentation/viewmodel/TransactionHistoryViewModel.ktAndroidDemo/app/src/main/java/io/ton/walletkit/demo/presentation/viewmodel/WalletKitViewModel.ktAndroidDemo/app/src/main/java/io/ton/walletkit/demo/presentation/viewmodel/WalletLifecycleManager.ktAndroidDemo/app/src/main/java/io/ton/walletkit/demo/presentation/viewmodel/WalletOperationsViewModel.ktTONWalletKit-Android/api/src/main/java/io/ton/walletkit/ITONWallet.ktTONWalletKit-Android/api/src/main/java/io/ton/walletkit/ITONWalletKit.ktTONWalletKit-Android/api/src/main/java/io/ton/walletkit/gasless/ITONGaslessManager.ktTONWalletKit-Android/api/src/main/java/io/ton/walletkit/gasless/ITONGaslessProvider.ktTONWalletKit-Android/api/src/main/java/io/ton/walletkit/model/ITONWalletAdapter.ktTONWalletKit-Android/api/src/main/java/io/ton/walletkit/request/TONWalletConnectionRequest.ktTONWalletKit-Android/api/src/main/java/io/ton/walletkit/staking/ITONStakingManager.ktTONWalletKit-Android/api/src/main/java/io/ton/walletkit/streaming/ITONStreamingManager.ktTONWalletKit-Android/api/src/main/java/io/ton/walletkit/streaming/ITONStreamingProvider.ktTONWalletKit-Android/api/src/main/java/io/ton/walletkit/swap/ITONSwapProvider.ktTONWalletKit-Android/impl/src/main/assets/walletkit/walletkit-android-bridge.mjsTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/core/TONWallet.ktTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/core/TONWalletKit.ktTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/core/streaming/TONStreamingManager.ktTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/core/streaming/TONStreamingProviderImpl.ktTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/engine/WalletKitEngine.ktTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/engine/WebViewWalletKitEngine.ktTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/engine/adapter/BridgeWalletAdapter.ktTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/engine/operations/GaslessOperations.ktTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/engine/operations/requests/GaslessRequests.ktTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/engine/state/AdapterManager.ktTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/engine/state/KotlinSwapProviderManager.ktTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/gasless/BuiltInGaslessProvider.ktTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/gasless/TONGaslessManager.ktTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/internal/constants/BridgeMethodConstants.ktTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/staking/TONStakingManager.ktTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/swap/BuiltInSwapProvider.ktTONWalletKit-Android/impl/src/test/java/io/ton/walletkit/CustomWalletAdapterTest.ktTONWalletKit-Android/impl/src/test/java/io/ton/walletkit/WalletManagementTest.ktTONWalletKit-Android/impl/src/test/java/io/ton/walletkit/mockbridge/DelayedReadyMockTest.ktTONWalletKit-Android/impl/src/test/java/io/ton/walletkit/mockbridge/EngineMethodEfficiencyTests.ktTONWalletKit-Android/impl/src/test/java/io/ton/walletkit/mockbridge/infra/MockScenario.ktTONWalletKit-Android/impl/src/test/java/io/ton/walletkit/mockbridge/infra/TestWalletKitFactory.kt
✅ Files skipped from review due to trivial changes (2)
- AndroidDemo/app/src/main/java/io/ton/walletkit/demo/presentation/viewmodel/JettonsListViewModel.kt
- AndroidDemo/app/src/main/java/io/ton/walletkit/demo/presentation/viewmodel/NFTsListViewModel.kt
🚧 Files skipped from review as they are similar to previous changes (8)
- TONWalletKit-Android/impl/src/main/java/io/ton/walletkit/engine/operations/requests/GaslessRequests.kt
- TONWalletKit-Android/impl/src/main/java/io/ton/walletkit/internal/constants/BridgeMethodConstants.kt
- TONWalletKit-Android/impl/src/main/java/io/ton/walletkit/gasless/BuiltInGaslessProvider.kt
- TONWalletKit-Android/impl/src/main/java/io/ton/walletkit/engine/adapter/BridgeWalletAdapter.kt
- TONWalletKit-Android/impl/src/main/java/io/ton/walletkit/gasless/TONGaslessManager.kt
- TONWalletKit-Android/api/src/main/java/io/ton/walletkit/gasless/ITONGaslessProvider.kt
- TONWalletKit-Android/impl/src/main/java/io/ton/walletkit/engine/operations/GaslessOperations.kt
- AndroidDemo/app/src/main/java/io/ton/walletkit/demo/presentation/viewmodel/WalletOperationsViewModel.kt

Summary by CodeRabbit
Release Notes