Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AND-8922 fixed tx eth build crash #864

Merged
merged 1 commit into from
Dec 28, 2024
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,15 @@ open class EthereumWalletManager(

return when (val signResponse = sign(transactionData, signer)) {
is Result.Success -> {
val transactionToSend = transactionBuilder.buildForSend(
transaction = transactionData,
signature = signResponse.data.first,
compiledTransaction = signResponse.data.second,
)
val transactionToSend = try {
transactionBuilder.buildForSend(
transaction = transactionData,
signature = signResponse.data.first,
compiledTransaction = signResponse.data.second,
)
} catch (e: BlockchainSdkError.FailedToBuildTx) {
return Result.Failure(e)
}

when (val sendResult = networkProvider.sendTransaction(transactionToSend.toHexString())) {
is SimpleResult.Success -> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.tangem.blockchain.common.network.interceptors

import android.util.Log
import com.squareup.moshi.adapter
import com.tangem.blockchain.common.BlockchainSdkConfig
import com.tangem.blockchain.common.di.DepsContainer
Expand Down Expand Up @@ -123,7 +122,6 @@ internal object HttpLoggingInterceptor : Interceptor {
val responseBody = response.body!!
val contentLength = responseBody.contentLength()

Log.e("logg--", "contentLength: $contentLength")
val message = if (!response.promisesBody()) {
"<-- END HTTP"
} else if (bodyHasUnknownEncoding(response.headers)) {
Expand Down Expand Up @@ -152,7 +150,6 @@ internal object HttpLoggingInterceptor : Interceptor {
if (!buffer.isProbablyUtf8()) {
"<-- END HTTP (binary ${buffer.size}-byte body omitted)"
} else {
Log.e("logg--", "${buffer.size}")
val json = if (contentLength != 0L) {
buffer.clone().readString(charset).beautifyJson()
} else {
Expand Down
Loading