Skip to content

Commit 933c633

Browse files
authored
Merge pull request #888 from Adamant-im/trello.com/c/ouNP4Ezx
Verify/update coin tx sending algorithm
2 parents 5cb9b38 + b5ed122 commit 933c633

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Adamant/Modules/TransactionsStatusService/Services/TxStatusService.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,21 @@ final class TxStatusService: TxStatusServiceProtocol {
6161
}
6262

6363
func forceUpdate(transaction: CoinTransaction) async {
64+
subscription?.cancel()
65+
6466
status = .notInitiated
6567
saveStatuses()
68+
6669
await updateStatus()
70+
71+
subscription = Task { [weak self] in
72+
while await self?.observationIteration() == true {
73+
try Task.checkCancellation()
74+
}
75+
}
76+
.eraseToAnyCancellable()
6777
}
78+
6879
}
6980

7081
extension TxStatusService {

0 commit comments

Comments
 (0)