Updated on 2026-08-14
This commit is contained in:
parent
410253dc5a
commit
3c3f35aeb6
26 changed files with 589 additions and 63 deletions
|
|
@ -1,5 +1,6 @@
|
|||
package com.tangem.domain.wallets.hot
|
||||
|
||||
import com.tangem.domain.models.wallet.UserWalletId
|
||||
import com.tangem.hot.sdk.model.*
|
||||
|
||||
interface HotWalletAccessor {
|
||||
|
|
@ -16,5 +17,7 @@ interface HotWalletAccessor {
|
|||
|
||||
fun clearContextualUnlock(hotWalletId: HotWalletId)
|
||||
|
||||
fun clearContextualUnlock(userWalletId: UserWalletId)
|
||||
|
||||
fun clearAllContextualUnlock()
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
package com.tangem.domain.wallets.usecase
|
||||
|
||||
import arrow.core.Either
|
||||
import com.tangem.domain.models.wallet.UserWalletId
|
||||
import com.tangem.domain.wallets.hot.HotWalletAccessor
|
||||
import com.tangem.hot.sdk.model.HotWalletId
|
||||
|
||||
|
|
@ -14,4 +15,10 @@ class ClearHotWalletContextualUnlockUseCase(
|
|||
hotWalletAccessor.clearContextualUnlock(hotWalletId)
|
||||
}
|
||||
}
|
||||
|
||||
operator fun invoke(userWalletId: UserWalletId): Either<Throwable, Unit> {
|
||||
return Either.catch {
|
||||
hotWalletAccessor.clearContextualUnlock(userWalletId)
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue