Skip to content

Conversation

DRadmir
Copy link
Contributor

@DRadmir DRadmir commented Oct 9, 2025

Summary

Implements transaction details navigation from push notifications. When a user taps on a transaction notification, the app fetches the transaction details and navigates directly to the transaction view.

Changes

  • Added GET /v1/transactions/{transactionId} API endpoint
  • Implemented getTransaction method in TransactionsService with database storage
  • Created TransactionLoaderViewModel and TransactionLoaderView for loading transaction details
  • Updated Scenes.Transaction to include assetId parameter
  • Enhanced push notification handler to fetch and navigate to transaction details

TODO

Copy link
Contributor

Summary of Changes

Hello @DRadmir, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly improves the user experience by enabling direct navigation to transaction details from push notifications. It involves the introduction of a new API endpoint for fetching individual transactions, updates to core services for handling these fetches, and modifications to the push notification parsing and handling logic to support this deep-linking functionality.

Highlights

  • Deep Linking for Transaction Notifications: The application now supports deep linking from transaction push notifications, allowing users to tap a notification and be directly navigated to the specific transaction details view within the app.
  • New API Endpoint for Single Transaction Retrieval: A new API endpoint, GET /v1/transactions/{transactionId}, has been implemented to facilitate fetching individual transaction details by their unique identifier.
  • Enhanced Transaction Service: The TransactionsService has been extended with a new getTransaction method, which leverages the new API endpoint to retrieve and locally store details for a specific transaction.
  • Push Notification Payload Update: The PushNotification.transaction enum has been modified to include the transactionId in its payload, enabling the app to correctly identify and fetch the relevant transaction upon notification interaction.
  • Local Transaction Retrieval Capability: A new method has been added to the TransactionStore to allow efficient retrieval of a specific TransactionExtended object from the local database using its walletId and transactionId.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request implements navigation to transaction details from push notifications. The changes involve updating the API definitions, services, and UI to handle the new notification payload and fetch the required transaction data. My review focuses on a critical race condition when switching wallets, opportunities to remove redundant data fetching for performance, ensuring data consistency when storing fetched transactions, and a minor code simplification. Overall, the changes are well-structured, but the identified issues should be addressed to ensure correctness and performance.

- Create TransactionLoaderViewModel and TransactionLoaderView for loading transaction details
- Add assetId parameter to Scenes.Transaction for proper asset fetching
- Implement getTransaction API endpoint (GET /v1/transactions/{transactionId})
- Add getTransaction method to TransactionsService with database storage
- Update TransactionLoaderViewModel to fetch assets and transactions asynchronously
- Use observeQuery and task for reactive transaction loading
- Update push notification handler to navigate to transaction details view
@DRadmir DRadmir force-pushed the 1180-open-transaction-details-view-when-press-on-transaction branch from 81a5a4a to fa68b2b Compare October 9, 2025 09:44
…-transaction-details-view-when-press-on-transaction
@DRadmir DRadmir self-assigned this Oct 9, 2025
if let walletId = walletService.currentWalletId {
let transaction = try await transactionsService.getTransaction(walletId: walletId, transactionId: transactionId)

navigationState.wallet.append(Scenes.Asset(asset: transaction.asset))
Copy link
Contributor

Choose a reason for hiding this comment

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

do wallet = [] if possible to avoid having too many paths in the stack

if walletIndex != model.wallet.index.asInt {
walletService.setCurrent(for: walletIndex)
}

Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we should push navigationState.wallet.append(Scenes.Asset(asset: transaction.asset)) first and then do preload transaction next, in this case if transactionsService.getTransaction is slow, you are at right asset. this works only if you have an asset already

@DRadmir DRadmir force-pushed the 1180-open-transaction-details-view-when-press-on-transaction branch from f9e0b35 to fe8acb5 Compare October 11, 2025 18:34
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