Updated on 2026-08-14

This commit is contained in:
Tangem 2025-07-10 22:47:25 +07:00
parent 67457f0746
commit 63a718d771
25 changed files with 186 additions and 85 deletions

View file

@ -22,6 +22,8 @@ import com.tangem.domain.tokens.model.CryptoCurrencyStatus
import com.tangem.domain.transaction.error.GetFeeError
import com.tangem.domain.transaction.usecase.GetFeeUseCase
import com.tangem.domain.walletconnect.WcRequestUseCaseFactory
import com.tangem.domain.walletconnect.model.WcRequestError
import com.tangem.domain.walletconnect.model.WcRequestError.Companion.message
import com.tangem.domain.walletconnect.usecase.method.*
import com.tangem.domain.wallets.models.UserWallet
import com.tangem.features.send.v2.api.callbacks.FeeSelectorModelCallback
@ -252,10 +254,10 @@ internal class WcSendTransactionModel @Inject constructor(
return false
}
private fun handleSigningError(result: Either<Throwable, Unit>, useCase: WcSignUseCase<*>) {
private fun handleSigningError(result: Either<WcRequestError, String>, useCase: WcSignUseCase<*>) {
if (result.isLeft()) {
val error = WcTransactionRoutes.Alert.Type.UnknownError(
errorMessage = result.leftOrNull()?.message,
errorMessage = result.leftOrNull()?.message(),
onDismiss = { cancel(useCase) },
)
stackNavigation.pushNew(WcTransactionRoutes.Alert(error))