diff --git a/CHANGELOG.md b/CHANGELOG.md index 8860a83f..7528dc2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ directly impact users rather than highlighting other crucial architectural updat - Splash screen animation is blocked by the main thread on iOS 16 and older. - Inactive hide balances button on iOS 16 and older. - Inactive close button in the exchange rate hint bubble on iOS 16 and older. +- A shield icon is no longer presented for received transactions to a transparent pool. ## 1.2 build 9 (2024-09-17) diff --git a/modules/Sources/Dependencies/SDKSynchronizer/SDKSynchronizerLive.swift b/modules/Sources/Dependencies/SDKSynchronizer/SDKSynchronizerLive.swift index d8df8344..adca33ce 100644 --- a/modules/Sources/Dependencies/SDKSynchronizer/SDKSynchronizerLive.swift +++ b/modules/Sources/Dependencies/SDKSynchronizer/SDKSynchronizerLive.swift @@ -67,9 +67,19 @@ extension SDKSynchronizerClient: DependencyKey { let latestBlockHeight = try await SDKSynchronizerClient.latestBlockHeight(synchronizer: synchronizer) for clearedTransaction in clearedTransactions { + var hasTransparentOutputs = false + let outputs = await synchronizer.getTransactionOutputs(for: clearedTransaction) + for output in outputs { + if case .transaparent = output.pool { + hasTransparentOutputs = true + break + } + } + var transaction = TransactionState.init( transaction: clearedTransaction, memos: nil, + hasTransparentOutputs: hasTransparentOutputs, latestBlockHeight: latestBlockHeight ) diff --git a/modules/Sources/Features/TransactionList/Views/TransactionHeaderView.swift b/modules/Sources/Features/TransactionList/Views/TransactionHeaderView.swift index c3cc19da..c91bb52c 100644 --- a/modules/Sources/Features/TransactionList/Views/TransactionHeaderView.swift +++ b/modules/Sources/Features/TransactionList/Views/TransactionHeaderView.swift @@ -119,7 +119,7 @@ struct TransactionHeaderView: View { } @ViewBuilder private func addressArea() -> some View { - if transaction.zAddress == nil { + if transaction.zAddress == nil && !transaction.hasTransparentOutputs { Asset.Assets.surroundedShield.image .zImage(width: 17, height: 13, color: Asset.Colors.primary.color) } else if !transaction.isAddressExpanded { diff --git a/modules/Sources/Models/TransactionState.swift b/modules/Sources/Models/TransactionState.swift index 32949e76..97d7f696 100644 --- a/modules/Sources/Models/TransactionState.swift +++ b/modules/Sources/Models/TransactionState.swift @@ -44,7 +44,8 @@ public struct TransactionState: Equatable, Identifiable { public var isIdExpanded: Bool public var isMarkedAsRead = false public var isInAddressBook = false - + public var hasTransparentOutputs = false + public var rawID: Data? = nil // UI Colors @@ -249,7 +250,12 @@ public struct TransactionState: Equatable, Identifiable { } extension TransactionState { - public init(transaction: ZcashTransaction.Overview, memos: [Memo]? = nil, latestBlockHeight: BlockHeight) { + public init( + transaction: ZcashTransaction.Overview, + memos: [Memo]? = nil, + hasTransparentOutputs: Bool = false, + latestBlockHeight: BlockHeight + ) { expiryHeight = transaction.expiryHeight minedHeight = transaction.minedHeight fee = transaction.fee @@ -262,6 +268,7 @@ extension TransactionState { isAddressExpanded = false isExpanded = false isIdExpanded = false + self.hasTransparentOutputs = hasTransparentOutputs memoCount = transaction.memoCount self.memos = memos