Skip to content

Add fiat transactions history on buy/sell screen#1810

Merged
DRadmir merged 9 commits intomainfrom
1807-add-fiat-transactions-history-on-buy-sell-screen
Mar 25, 2026
Merged

Add fiat transactions history on buy/sell screen#1810
DRadmir merged 9 commits 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-24 at 13 59 08 Simulator Screenshot - iPhone 17 Pro - 2026-03-23 at 15 07 27

Close: #1807
Close: #1409

@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.

DRadmir added 2 commits March 21, 2026 22:58
- 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
Keep only the transaction list for now. Remove:
- FiatTransactionDetailScene, ViewModel, and Section types
- FiatTransactionRequest (single-item GRDB query)
- FiatAmountDisplay and AmountDisplay.fiat case
- ExplorerService dependency from FiatConnect
- Scenes.FiatTransaction navigation type
@DRadmir DRadmir force-pushed the 1807-add-fiat-transactions-history-on-buy-sell-screen branch from dbd98fc to 851a342 Compare March 21, 2026 18:12
.references(AssetRecord.databaseTableName, onDelete: .cascade, onUpdate: .cascade)
$0.column(Columns.transactionType.name, .text)
.notNull()
$0.column(Columns.providerId.name, .text)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
$0.column(Columns.providerId.name, .text)
$0.column(Columns.providerId.name, .jsonText)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we use .text for simple string/enum columns. jsonText is for JSON-encoded structures

DRadmir added 2 commits March 24, 2026 14:02
…conformance

Single FiatService handles both fiat API calls and transaction history,
removing the dual injection of GemAPIFiatService + FiatTransactionService.
Also adds consistent chevron to all fiat transaction rows.
…fiat-transactions-history-on-buy-sell-screen

# Conflicts:
#	Packages/Store/Sources/Migrations.swift
@DRadmir DRadmir marked this pull request as ready for review March 24, 2026 09:05
@DRadmir DRadmir requested a review from gemcoder21 March 25, 2026 07:22
.filter(FiatTransactionRecord.Columns.walletId == walletId.id)
.asRequest(of: FiatTransactionRecordInfo.self)
.fetchAll(db)
.map { $0.map() }
Copy link
Contributor

Choose a reason for hiding this comment

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

.order(FiatTransactionRecord.Columns.createdAt.desc)

DateSectionBuilder uses to group by date, the sections will be correct, but items within sections may appear in arbitrary order.

ListItemView(model: viewModel.listItemModel)
}
} else {
NavigationCustomLink(
Copy link
Contributor

Choose a reason for hiding this comment

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

There will be chevron with no action, maybe instead just use ListItemView?

@DRadmir DRadmir merged commit 97c9234 into main Mar 25, 2026
1 check was pending
@DRadmir DRadmir deleted the 1807-add-fiat-transactions-history-on-buy-sell-screen branch March 25, 2026 17:16
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 Add Buy Tranasctions for a device

3 participants