88from ..askar .profile_anon import AskarAnoncredsProfile
99from ..core .profile import Profile
1010from ..multitenant .manager import MultitenantManager
11+ from ..multitenant .single_wallet_askar_manager import SingleWalletAskarMultitenantManager
1112from ..storage .base import BaseStorageSearch
1213from ..wallet .models .wallet_record import WalletRecord
1314
@@ -41,6 +42,13 @@ async def get_subwallet_profiles_from_storage(root_profile: Profile) -> list[Pro
4142 search_session = base_storage_search .search_records (
4243 type_filter = WalletRecord .RECORD_TYPE , page_size = 10
4344 )
45+ if (
46+ root_profile .context .settings .get ("multitenant.wallet_type" )
47+ == "single-wallet-askar"
48+ ):
49+ manager = SingleWalletAskarMultitenantManager (root_profile )
50+ else :
51+ manager = MultitenantManager (root_profile )
4452 while search_session ._done is False :
4553 wallet_storage_records = await search_session .fetch ()
4654 for wallet_storage_record in wallet_storage_records :
@@ -49,7 +57,7 @@ async def get_subwallet_profiles_from_storage(root_profile: Profile) -> list[Pro
4957 json .loads (wallet_storage_record .value ),
5058 )
5159 subwallet_profiles .append (
52- await MultitenantManager ( root_profile ) .get_wallet_profile (
60+ await manager .get_wallet_profile (
5361 base_context = root_profile .context ,
5462 wallet_record = wallet_record ,
5563 )
0 commit comments