Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Flipcash/Core/Screens/Main/BalanceScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ struct BalanceScreen: View {
}

private var usdcBalance: ExchangedBalance? {
balances.first { $0.stored.mint == .usdc }
balances.first { $0.stored.mint == .usdc && $0.stored.quarks > 0 }
}

// MARK: - Init -
Expand Down
4 changes: 2 additions & 2 deletions Flipcash/Core/Session/Session.swift
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ class Session: ObservableObject {
balances.compactMap { stored in
let exchangedFiat = stored.computeExchangedValue(with: rate)

// Filter out balances with zero fiat value after conversion
guard exchangedFiat.hasDisplayableValue() else {
// Filter out balances with zero fiat value after conversion (except for USDC)
guard stored.mint == .usdc || exchangedFiat.hasDisplayableValue() else {
return nil
}

Expand Down
2 changes: 0 additions & 2 deletions FlipcashTests/GiveViewModelTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@ struct GiveViewModelTests {

/// Helper to create a test view model
static func createViewModel() -> GiveViewModel {
let isPresented = Binding<Bool>(get: { true }, set: { _ in })
let container = Container.mock
let sessionContainer = SessionContainer.mock

let viewModel = GiveViewModel(
isPresented: isPresented,
container: container,
sessionContainer: sessionContainer
)
Expand Down