Skip to content

Add fiat transactions history on buy/sell screen#1810

Draft
DRadmir wants to merge 1 commit intomainfrom
1807-add-fiat-transactions-history-on-buy-sell-screen
Draft

Add fiat transactions history on buy/sell screen#1810
DRadmir wants to merge 1 commit intomainfrom
1807-add-fiat-transactions-history-on-buy-sell-screen

Conversation

@DRadmir
Copy link
Contributor

@DRadmir DRadmir commented Mar 20, 2026

Simulator Screenshot - iPhone 17 Pro - 2026-03-20 at 22 05 59 Simulator Screenshot - iPhone 17 Pro - 2026-03-20 at 22 06 02 Simulator Screenshot - iPhone 17 Pro - 2026-03-20 at 22 06 08

Close: #1807

- Add FiatTransactionsScene (activity list) and FiatTransactionDetailScene with asset preview headers
- Add FiatTransactionService for fetching and storing fiat transaction history
- Add FiatTransactionStore with GRDB persistence and observable queries
- Add FiatTransactionViewModel producing ListItemModel with status tags (pending/failed)
- Add FiatTransactionStatusViewModel for consistent status colors
- Add FiatProviderName display names and images for providers
- Add FiatAmountDisplay for fiat-only transaction headers
- Pass fiatTransactionService through model chain from app target (no @Entry/@Environment hack)
- Update AmountSceneViewModel and ConfirmTransferSceneViewModel to carry fiatTransactionService
- Add navigation from FiatConnectNavigationView to activity list and detail screens
- Gray subtitle color for failed transactions, no +/- signs on fiat amounts
@DRadmir DRadmir self-assigned this Mar 20, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, 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 introduces a significant new feature, allowing users to view their fiat transaction history directly within the application's buy/sell interface. It provides a dedicated screen to list all fiat transactions and a detailed view for each, enhancing transparency and user experience for fiat operations. The changes involve new UI components, a dedicated service layer for transaction management, and robust data persistence to ensure transaction history is readily available.

Highlights

  • Fiat Transaction History UI: Introduced new SwiftUI views (FiatTransactionsScene and FiatTransactionDetailScene) to display a list of fiat transactions and their detailed information within the buy/sell flow.
  • Fiat Transaction Service: Implemented a new FiatTransactionService responsible for fetching fiat transaction data from the API and persisting it locally using a new FiatTransactionStore.
  • Data Models and Persistence: Added new data models (FiatTransaction, FiatTransactionStatus) and corresponding GRDB records (FiatTransactionRecord) to support the storage and retrieval of fiat transaction details.
  • Dependency Injection and Integration: Integrated the new FiatTransactionService across various view models (FiatSceneViewModel, AmountSceneViewModel, ConfirmTransferSceneViewModel) and the application's dependency injection system (AppResolver, ServicesFactory, ViewModelFactory).

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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.

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 introduces a significant new feature: a history screen for fiat transactions. The implementation is well-structured, adding new scenes, view models, services, and database components across the relevant packages. The code follows existing architectural patterns, such as using reactive queries to populate views from a local store. My feedback focuses on improving user experience through better error handling, enhancing accessibility by adjusting color usage, and general code hygiene.

Comment on lines +37 to +39
} catch {
debugLog("FiatTransactionsViewModel fetch error: \(error)")
}
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Silently catching and logging the error here means the user receives no feedback if fetching transactions fails. They will see an empty or stale list, which can be confusing. It's better to expose this error state to the view so it can display an appropriate error message. Consider adding a state property to the view model to track fetching errors.


import SwiftUI
import Store
import FiatConnect
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This import FiatConnect statement appears to be unused in the file. It should be removed to maintain code cleanliness.

address: address
)
}
} No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The file should end with a newline character. This is a common code style convention that many tools expect.

Comment on lines +71 to +75
private var subtitleColor: Color {
switch transaction.status {
case .failed: Colors.gray
case .pending, .complete, .unknown: Colors.black
}
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Using Colors.gray for the subtitle when a transaction has failed reduces text contrast, which can be an accessibility issue. Since the failed status is already clearly indicated by the title tag (which is styled with a red color), it's better to ensure the amount remains clearly readable. I suggest making the amount always black for better readability and accessibility, regardless of the transaction status.

    private var subtitleColor: Color {
        Colors.black
    }

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.

Add fiat transactions history on Buy / Sell screen

1 participant