Updated on 2026-08-14
This commit is contained in:
parent
f748b8539d
commit
f1238f5ef8
20 changed files with 528 additions and 88 deletions
|
|
@ -7,7 +7,6 @@ import arrow.core.raise.either
|
|||
import arrow.core.right
|
||||
import com.squareup.moshi.Moshi
|
||||
import com.tangem.blockchain.common.*
|
||||
import com.tangem.blockchain.extensions.Result
|
||||
import com.tangem.blockchainsdk.utils.fromNetworkId
|
||||
import com.tangem.data.tokens.utils.CryptoCurrencyFactory
|
||||
import com.tangem.datasource.api.common.response.ApiResponse
|
||||
|
|
@ -362,10 +361,10 @@ internal class DefaultSwapRepository @Inject constructor(
|
|||
),
|
||||
) ?: error("Cannot cast to Approver")
|
||||
|
||||
return when (result) {
|
||||
is Result.Success -> result.data
|
||||
is Result.Failure -> error(result.error)
|
||||
}
|
||||
return result.fold(
|
||||
onSuccess = { it },
|
||||
onFailure = { error(it) },
|
||||
)
|
||||
}
|
||||
|
||||
override suspend fun getApproveData(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue