-
Notifications
You must be signed in to change notification settings - Fork 0
feat(CONS-6022): add analytics events to mobile sdks #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
feat(CONS-6022): add analytics events to mobile sdks #17
Conversation
📝 Walkthrough""" WalkthroughThe changes introduce a new Changes
Assessment against linked issues
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
app/src/main/java/com/truv/api/TruvApiClient.kt (1)
61-65
: Consider making user names configurable for non-demo usage.The implementation correctly adds first and last names to the user creation request. However, the hardcoded values "John" and "Doe" are appropriate for a demo app but should be configurable if this code is used in production.
For production usage, consider making these configurable:
- fun createUser( - onSuccess: (id: String) -> Unit, onFailure: (message: String?) -> Unit - ) = runBlocking { + fun createUser( + firstName: String = "John", + lastName: String = "Doe", + onSuccess: (id: String) -> Unit, + onFailure: (message: String?) -> Unit + ) = runBlocking { val gson = Gson() "$baseUrl/v1/users/".httpPost().header( mapOf( "Content-Type" to "application/json", "X-Access-Client-Id" to clientId, "X-Access-Secret" to clientSecret ) ).body(gson.toJson(mapOf( "external_user_id" to "demo-app-${UUID.randomUUID()}", - "first_name" to "John", - "last_name" to "Doe", + "first_name" to firstName, + "last_name" to lastName, )))app/src/main/java/com/truv/MainViewModel.kt (1)
20-20
: Consider using a more generic default bank address.The implementation correctly adds the
bankAddress
property. However, the specific real address used as default might not be appropriate for all demo scenarios.Consider using a more generic placeholder:
- @SerializedName("bank_address") val bankAddress: String = "357 Kings Hwy N, Cherry Hill, NJ 08034, USA", + @SerializedName("bank_address") val bankAddress: String = "123 Main St, Anytown, ST 12345, USA",
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Knowledge Base: Disabled due to Reviews > Disable Knowledge Base setting
📒 Files selected for processing (4)
app/src/main/java/com/truv/MainViewModel.kt
(3 hunks)app/src/main/java/com/truv/ProductFragment.kt
(1 hunks)app/src/main/java/com/truv/api/TruvApiClient.kt
(1 hunks)app/src/main/java/com/truv/ui/AdditionalSettings.kt
(1 hunks)
🔇 Additional comments (4)
app/src/main/java/com/truv/ProductFragment.kt (1)
74-75
: LGTM: Correctly updated to use both API and CDN URLs.The configuration properly uses both
apiUrl
andcdnUrl
from theServerUrls
data class, which aligns with the updated data model inMainViewModel.kt
.app/src/main/java/com/truv/ui/AdditionalSettings.kt (1)
143-154
: LGTM: Consistent implementation following established patterns.The bank address input field is properly implemented with correct state binding and follows the same pattern as other account-related fields. The placement within the conditional block for deposit_switch and pll products is appropriate.
app/src/main/java/com/truv/MainViewModel.kt (2)
59-59
: LGTM: Property renamed consistently.The renaming from
url
toapiUrl
improves clarity and is properly reflected in the usage throughout the codebase.
269-269
: LGTM: Correctly updated to use the renamed property.The code properly uses the renamed
apiUrl
property instead of destructuring a single URL value, maintaining consistency with the updatedServerUrls
data class.Also applies to: 276-276
…-events-to-mobile-sdks
Summary by CodeRabbit