Updated on 2026-08-14
This commit is contained in:
parent
a6323c268c
commit
71dd38f1fd
4 changed files with 8 additions and 3 deletions
|
|
@ -8,6 +8,7 @@ import com.tangem.data.walletconnect.sign.SignStateConverter.toSigning
|
|||
import com.tangem.domain.walletconnect.WcAnalyticEvents
|
||||
import com.tangem.domain.walletconnect.model.WcRequestError
|
||||
import com.tangem.domain.walletconnect.model.WcRequestError.Companion.code
|
||||
import com.tangem.domain.walletconnect.model.WcRequestError.Companion.message
|
||||
import com.tangem.domain.walletconnect.usecase.method.WcSignState
|
||||
import com.tangem.domain.walletconnect.usecase.method.WcSignStep
|
||||
import kotlinx.coroutines.Job
|
||||
|
|
@ -65,10 +66,12 @@ internal class WcSignUseCaseDelegate<MiddleAction, SignModel>(
|
|||
val step = state.domainStep as? WcSignStep.Result ?: return@onEach
|
||||
val event = step.result.fold(
|
||||
ifLeft = { error ->
|
||||
val errorMessage = error.message() ?: ""
|
||||
WcAnalyticEvents.SignatureRequestFailed(
|
||||
rawRequest = context.rawSdkRequest,
|
||||
network = context.network,
|
||||
errorCode = error.code() ?: error::class.simpleName.orEmpty(),
|
||||
errorMessage = errorMessage,
|
||||
)
|
||||
},
|
||||
ifRight = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue