Updated on 2026-08-14

This commit is contained in:
Tangem 2025-09-11 15:53:28 +05:00
parent 410253dc5a
commit 3c3f35aeb6
26 changed files with 589 additions and 63 deletions

View file

@ -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()
}

View file

@ -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)
}
}
}