Updated on 2026-08-14
This commit is contained in:
parent
04bcb44f76
commit
e599995315
18 changed files with 142 additions and 30 deletions
|
|
@ -52,6 +52,9 @@ class DefaultHotWalletAccessor @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
override fun getContextualUnlock(hotWalletId: HotWalletId): UnlockHotWallet? =
|
||||
contextualUnlockHotWallet[hotWalletId]
|
||||
|
||||
override fun clearContextualUnlock(hotWalletId: HotWalletId) {
|
||||
contextualUnlockHotWallet[hotWalletId] = null
|
||||
scope.launch {
|
||||
|
|
@ -59,6 +62,14 @@ class DefaultHotWalletAccessor @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
override fun clearAllContextualUnlock() {
|
||||
val hotWalletsIds = contextualUnlockHotWallet.keys.toList()
|
||||
contextualUnlockHotWallet.clear()
|
||||
scope.launch {
|
||||
hotWalletsIds.forEach { tangemHotSdk.clearUnlockContext(it) }
|
||||
}
|
||||
}
|
||||
|
||||
private suspend fun <T> hotSdkRequest(hotWalletId: HotWalletId, block: suspend (unlock: UnlockHotWallet) -> T): T {
|
||||
val isAccessCodeRequired = walletsRepository.requireAccessCode()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue