Skip to content

Commit b7938d4

Browse files
committed
Fix zcash updates with changing txIndex
1 parent 5616307 commit b7938d4

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

UnstoppableWallet/UnstoppableWallet/Core/Adapters/ZcashTransactionPool.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class ZcashTransactionPool {
6464
}
6565

6666
private func sync(own: inout Set<ZcashTransactionWrapper>, incoming: [ZcashTransactionWrapper]) {
67-
incoming.forEach { transaction in own.insert(transaction) }
67+
incoming.forEach { transaction in own.update(with: transaction) }
6868
}
6969

7070
func initTransactions() async {

UnstoppableWallet/UnstoppableWallet/Core/Adapters/ZcashTransactionWrapper.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,13 @@ extension ZcashTransactionWrapper: Comparable {
117117
}
118118

119119
public static func == (lhs: ZcashTransactionWrapper, rhs: ZcashTransactionWrapper) -> Bool {
120-
lhs.transactionHash == rhs.transactionHash && lhs.transactionIndex == rhs.transactionIndex
120+
lhs.transactionHash == rhs.transactionHash
121121
}
122122
}
123123

124124
extension ZcashTransactionWrapper: Hashable {
125125
public func hash(into hasher: inout Hasher) {
126126
hasher.combine(transactionHash)
127-
hasher.combine(transactionIndex)
128127
}
129128
}
130129

0 commit comments

Comments
 (0)