feat: add transaction failure handling and timeout configuration for …#116
feat: add transaction failure handling and timeout configuration for …#116nikdim03 wants to merge 4 commits into
Conversation
|
Warning Review limit reached
More reviews will be available in 16 minutes and 2 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (31)
📒 Files selected for processing (4)
📝 WalkthroughWalkthroughPR adds TonConnect request failure callbacks to demo app for transaction error handling, simplifies transaction request flow by removing preflight balance checks, and introduces configurable per-request timeout support for API clients across ViewModel wiring, transaction processing, and configuration serialization. ChangesTonConnect Failure Handling & SDK Configuration
🎯 3 (Moderate) | ⏱️ ~25 minutes
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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: 1
🤖 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/config/TONWalletKitConfiguration.kt`:
- Around line 153-157: The APIClientConfiguration data class currently allows
timeout values <= 0; add a constructor guard in APIClientConfiguration (e.g., an
init block) that checks if timeout != null and timeout <= 0 and throws an
IllegalArgumentException with a clear message so invalid timeouts fail fast;
keep the validation local to APIClientConfiguration and do not change the public
signature.
🪄 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: b0b56090-cd24-430d-8406-38d696664a4f
📒 Files selected for processing (6)
AndroidDemo/app/src/main/java/io/ton/walletkit/demo/presentation/viewmodel/TonConnectViewModel.ktAndroidDemo/app/src/main/java/io/ton/walletkit/demo/presentation/viewmodel/WalletKitViewModel.ktAndroidDemo/app/src/main/res/values/strings.xmlTONWalletKit-Android/api/src/main/java/io/ton/walletkit/config/TONWalletKitConfiguration.ktTONWalletKit-Android/impl/src/main/assets/walletkit/walletkit-android-bridge.mjsTONWalletKit-Android/impl/src/main/java/io/ton/walletkit/engine/infrastructure/InitializationManager.kt
…API client
Summary by CodeRabbit
New Features
Bug Fixes
Chores