File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
app/src/main/java/to/bitkit/repositories Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ class ActivityRepo @Inject constructor(
5757 syncLdkNodePayments(payments = payments)
5858 updateActivitiesMetadata()
5959 boostPendingActivities()
60+ updateInProgressTransfers()
6061 isSyncingLdkNodePayments = false
6162 return @withContext Result .success(Unit )
6263 }.onFailure { e ->
@@ -323,6 +324,18 @@ class ActivityRepo @Inject constructor(
323324 }
324325 }
325326
327+ private suspend fun updateInProgressTransfers () {
328+ cacheStore.data.first().inProgressTransfers.forEach { transfer ->
329+ getActivity(transfer.activityId).onSuccess { activity ->
330+ (activity as ? Onchain )?.let { onChain ->
331+ if (onChain.v1.confirmed) {
332+ cacheStore.removeInProgressTransfer(transfer)
333+ }
334+ }
335+ }
336+ }
337+ }
338+
326339 private suspend fun boostPendingActivities () = withContext(bgDispatcher) {
327340 cacheStore.data.first().pendingBoostActivities.forEach { pendingBoostActivity ->
328341 findActivityByPaymentId(
You can’t perform that action at this time.
0 commit comments