Skip to content

Commit 4f04c26

Browse files
committed
add logs
1 parent 43810cf commit 4f04c26

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Bitkit/Utilities/AddressChecker.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ class AddressChecker {
8282
}
8383
}
8484

85+
/// Fetches full transaction details from the Esplora endpoint for the given txid.
86+
/// - Parameter txid: Hex transaction identifier.
8587
static func getTransaction(txid: String) async throws -> TxDetails {
8688
guard let url = URL(string: "\(Env.esploraServerUrl)/tx/\(txid)") else {
8789
throw AddressCheckerError.invalidUrl
@@ -99,6 +101,7 @@ class AddressChecker {
99101
let decoder = JSONDecoder()
100102
return try decoder.decode(TxDetails.self, from: data)
101103
} catch let error as DecodingError {
104+
Logger.error("decoding error \(error)")
102105
throw AddressCheckerError.invalidResponse
103106
} catch {
104107
throw AddressCheckerError.networkError(error)

0 commit comments

Comments
 (0)