Updated on 2026-08-14
This commit is contained in:
parent
5c5c31dfc0
commit
3e4e7d8da0
17 changed files with 120 additions and 34 deletions
|
|
@ -2,11 +2,11 @@ package com.tangem.domain.walletconnect.usecase.method
|
|||
|
||||
import arrow.core.Either
|
||||
import com.tangem.domain.models.network.Network
|
||||
import com.tangem.domain.models.wallet.UserWallet
|
||||
import com.tangem.domain.walletconnect.model.WcMethod
|
||||
import com.tangem.domain.walletconnect.model.WcRequestError
|
||||
import com.tangem.domain.walletconnect.model.WcSession
|
||||
import com.tangem.domain.walletconnect.model.sdkcopy.WcSdkSessionRequest
|
||||
import com.tangem.domain.models.wallet.UserWallet
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
||||
interface WcMethodUseCase
|
||||
|
|
@ -16,10 +16,15 @@ interface WcMethodContext {
|
|||
val rawSdkRequest: WcSdkSessionRequest
|
||||
val network: Network
|
||||
val method: WcMethod
|
||||
val walletAddress: String
|
||||
val derivationState: WcNetworkDerivationState
|
||||
val wallet: UserWallet get() = session.wallet
|
||||
}
|
||||
|
||||
sealed class WcNetworkDerivationState {
|
||||
data object Single : WcNetworkDerivationState()
|
||||
data class Multiple(val walletAddress: String) : WcNetworkDerivationState()
|
||||
}
|
||||
|
||||
/**
|
||||
* Wc Methods that must be signed by Tangem card
|
||||
* [WcSignState] represents signing state
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue