Skip to content

Commit

Permalink
Remove base wallet type must be new wallet type restriction
Browse files Browse the repository at this point in the history
Signed-off-by: jamshale <jamiehalebc@gmail.com>
  • Loading branch information
jamshale committed Feb 24, 2025
1 parent 1208e58 commit fa96215
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
6 changes: 0 additions & 6 deletions acapy_agent/multitenant/admin/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
from ...multitenant.base import BaseMultitenantManager
from ...storage.error import StorageError, StorageNotFoundError
from ...utils.endorsement_setup import attempt_auto_author_with_endorser_setup
from ...utils.profiles import subwallet_type_not_same_as_base_wallet_raise_web_exception
from ...wallet.error import WalletSettingsError
from ...wallet.models.wallet_record import WalletRecord, WalletRecordSchema
from ..error import WalletKeyMissingError
Expand Down Expand Up @@ -450,11 +449,6 @@ async def wallet_create(request: web.BaseRequest):

base_wallet_type = context.profile.settings.get("wallet.type")
sub_wallet_type = body.get("wallet_type", base_wallet_type)

subwallet_type_not_same_as_base_wallet_raise_web_exception(
base_wallet_type, sub_wallet_type
)

key_management_mode = body.get("key_management_mode") or WalletRecord.MODE_MANAGED
wallet_key = body.get("wallet_key")
wallet_webhook_urls = body.get("wallet_webhook_urls") or []
Expand Down
10 changes: 0 additions & 10 deletions acapy_agent/utils/profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,6 @@ def is_not_anoncreds_profile_raise_web_exception(profile: Profile) -> None:
raise web.HTTPForbidden(reason=ANONCREDS_PROFILE_REQUIRED_MSG)


def subwallet_type_not_same_as_base_wallet_raise_web_exception(
base_wallet_type: str, sub_wallet_type: str
) -> None:
"""Raise a web exception when the subwallet type is not the same as the base wallet type.""" # noqa: E501
if base_wallet_type != sub_wallet_type:
raise web.HTTPForbidden(
reason="Subwallet type must be the same as the base wallet type"
)


async def get_subwallet_profiles_from_storage(root_profile: Profile) -> list[Profile]:
"""Get subwallet profiles from storage."""
subwallet_profiles = []
Expand Down

0 comments on commit fa96215

Please sign in to comment.