Skip to content

Commit

Permalink
Fix subwallet anoncreds upgrade check (#3345)
Browse files Browse the repository at this point in the history
Signed-off-by: jamshale <[email protected]>
  • Loading branch information
jamshale authored Nov 22, 2024
1 parent fc6f35d commit 2d4212a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
14 changes: 1 addition & 13 deletions acapy_agent/core/conductor.py
Original file line number Diff line number Diff line change
Expand Up @@ -856,19 +856,7 @@ async def check_for_valid_wallet_type(self, profile):

async def check_for_wallet_upgrades_in_progress(self):
"""Check for upgrade and upgrade if needed."""

# We need to use the correct multitenant manager for single vs multiple wallets
# here because the multitenant provider hasn't been initialized yet.
manager_type = self.context.settings.get_value(
"multitenant.wallet_type", default="basic"
).lower()

manager_class = MultitenantManagerProvider.MANAGER_TYPES.get(
manager_type, manager_type
)

multitenant_mgr = self.context.inject_or(manager_class)
if multitenant_mgr:
if self.context.settings.get_value("multitenant.enabled"):
subwallet_profiles = await get_subwallet_profiles_from_storage(
self.root_profile
)
Expand Down
1 change: 1 addition & 0 deletions acapy_agent/wallet/anoncreds_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,7 @@ async def check_upgrade_completion_loop(profile: Profile, is_subwallet=False):
UpgradeInProgressSingleton().remove_wallet(profile.name)
if is_subwallet:
await upgrade_subwallet(profile)
await finish_upgrade(profile)
LOGGER.info(
f"""Upgrade of subwallet {profile.settings.get('wallet.name')} has completed. Profile is now askar-anoncreds""" # noqa: E501
)
Expand Down

0 comments on commit 2d4212a

Please sign in to comment.