File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed
app/src/main/java/to/bitkit/utils Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -3,9 +3,7 @@ package to.bitkit.utils
33import io.ktor.client.HttpClient
44import io.ktor.client.call.body
55import io.ktor.client.request.get
6- import io.ktor.http.contentType
76import kotlinx.serialization.Serializable
8- import kotlinx.serialization.json.Json
97import to.bitkit.env.Env
108import javax.inject.Inject
119import javax.inject.Singleton
@@ -34,17 +32,8 @@ class AddressChecker @Inject constructor(
3432 try {
3533 val response = client.get(" ${Env .esploraServerUrl} /tx/$txid " )
3634
37- // Debug: Check content type and body
38- Logger .debug(" Response status: ${response.status} " )
39- Logger .debug(" Response content type: ${response.contentType()} " )
40-
41- val bodyAsString = response.body<String >()
42- Logger .debug(" Response body: $bodyAsString " )
43-
44- // Parse manually to see if the JSON structure is correct
45- return Json .decodeFromString<TxDetails >(bodyAsString)
35+ return response.body<TxDetails >()
4636 } catch (e: Exception ) {
47- Logger .error(" getTransaction error" , e)
4837 throw AddressCheckerError .NetworkError (e)
4938 }
5039 }
You can’t perform that action at this time.
0 commit comments