Skip to content
Merged
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
4 changes: 3 additions & 1 deletion Bitkit/Services/CoreService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
}
}
await MainActor.run {
self.cachedTxIdsInBoostTxIds = txIds

Check warning on line 56 in Bitkit/Services/CoreService.swift

View workflow job for this annotation

GitHub Actions / Run Tests

reference to captured var 'txIds' in concurrently-executing code; this is an error in the Swift 6 language mode
}
} catch {
Logger.error("Failed to refresh boostTxIds cache: \(error)", context: "ActivityService")
Expand Down Expand Up @@ -108,7 +108,7 @@

func isActivitySeen(id: String) async -> Bool {
do {
if let activity = try await getActivityById(activityId: id) {

Check warning on line 111 in Bitkit/Services/CoreService.swift

View workflow job for this annotation

GitHub Actions / Run Tests

no 'async' operations occur within 'await' expression
switch activity {
case let .onchain(onchain):
return onchain.seenAt != nil
Expand Down Expand Up @@ -657,7 +657,7 @@
}

private func processLightningPayment(_ payment: PaymentDetails) async throws {
guard case let .bolt11(hash, preimage, secret, description, bolt11) = payment.kind else { return }

Check warning on line 660 in Bitkit/Services/CoreService.swift

View workflow job for this annotation

GitHub Actions / Run Tests

immutable value 'secret' was never used; consider replacing with '_' or removing it

Check warning on line 660 in Bitkit/Services/CoreService.swift

View workflow job for this annotation

GitHub Actions / Run Tests

immutable value 'hash' was never used; consider replacing with '_' or removing it

// Skip pending inbound payments - just means they created an invoice
guard !(payment.status == .pending && payment.direction == .inbound) else { return }
Expand Down Expand Up @@ -713,7 +713,7 @@

for payment in payments {
do {
let state: BitkitCore.PaymentState = switch payment.status {

Check warning on line 716 in Bitkit/Services/CoreService.swift

View workflow job for this annotation

GitHub Actions / Run Tests

immutable value 'state' was never used; consider replacing with '_' or removing it
case .failed:
.failed
case .pending:
Expand Down Expand Up @@ -749,7 +749,7 @@
latestCaughtError = error
}
}
} catch {

Check warning on line 752 in Bitkit/Services/CoreService.swift

View workflow job for this annotation

GitHub Actions / Run Tests

'catch' block is unreachable because no errors are thrown in 'do' block
Logger.error("Error syncing LDK payment: \(error)", context: "CoreService")
latestCaughtError = error
}
Expand Down Expand Up @@ -803,7 +803,7 @@
}
}

let closedChannels = try await getAllClosedChannels(sortDirection: .desc)

Check warning on line 806 in Bitkit/Services/CoreService.swift

View workflow job for this annotation

GitHub Actions / Run Tests

no 'async' operations occur within 'await' expression
guard !closedChannels.isEmpty else { return nil }

let details = if let provided = transactionDetails { provided } else { await fetchTransactionDetails(txid: txid) }
Expand Down Expand Up @@ -1189,8 +1189,10 @@

Logger.info("RBF transaction created successfully: \(txid)", context: "CoreService.boostOnchainTransaction")

// For RBF, mark the original activity as boosted until the replacement comes
// For RBF, mark the original activity as boosted and update the fee rate
// so the UI shows the correct confirmation time estimate until the replacement arrives
onchainActivity.isBoosted = true
onchainActivity.feeRate = UInt64(feeRate)
try await self.update(id: activityId, activity: .onchain(onchainActivity))
Logger.info(
"Successfully marked activity \(activityId) as replaced by fee",
Expand Down
Loading