Updated on 2026-08-14
This commit is contained in:
parent
effe637f9f
commit
c5d78b2040
11 changed files with 156 additions and 0 deletions
|
|
@ -202,4 +202,24 @@ internal class DefaultWalletsRepository(
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun nftEnabledStatus(userWalletId: UserWalletId): Flow<Boolean> {
|
||||
return appPreferencesStore
|
||||
.get(key = PreferencesKeys.WALLETS_WITH_NFT_ENABLED_KEY, default = emptySet())
|
||||
.map { it.contains(userWalletId.stringValue) }
|
||||
}
|
||||
|
||||
override suspend fun enableNFT(userWalletId: UserWalletId) {
|
||||
appPreferencesStore.editData {
|
||||
val added = it[PreferencesKeys.WALLETS_WITH_NFT_ENABLED_KEY].orEmpty()
|
||||
it[PreferencesKeys.WALLETS_WITH_NFT_ENABLED_KEY] = added + userWalletId.stringValue
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun disableNFT(userWalletId: UserWalletId) {
|
||||
appPreferencesStore.editData {
|
||||
val added = it[PreferencesKeys.WALLETS_WITH_NFT_ENABLED_KEY].orEmpty()
|
||||
it[PreferencesKeys.WALLETS_WITH_NFT_ENABLED_KEY] = added - userWalletId.stringValue
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue