Skip to content

Commit

Permalink
Merge branch 'main' into feat/2717
Browse files Browse the repository at this point in the history
  • Loading branch information
swcurran authored Jan 17, 2024
2 parents dd7f0d2 + 0b80693 commit 87bb19c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions aries_cloudagent/config/argparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -1700,13 +1700,13 @@ def get_settings(self, args: Namespace) -> dict:
settings["wallet.replace_public_did"] = True
if args.recreate_wallet:
settings["wallet.recreate"] = True
# check required settings for 'indy' wallets
# check required settings for persistent wallets
if settings["wallet.type"] in ["indy", "askar", "askar-anoncreds"]:
# requires name, key
if not args.wallet_name or not args.wallet_key:
raise ArgsParseError(
"Parameters --wallet-name and --wallet-key must be provided "
"for indy wallets"
"for persistent wallets"
)
# postgres storage requires additional configuration
if (
Expand Down
4 changes: 3 additions & 1 deletion aries_cloudagent/multitenant/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ async def create_wallet(
)

await wallet_record.save(session)

try:
# provision wallet
profile = await self.get_wallet_profile(
Expand All @@ -202,7 +203,8 @@ async def create_wallet(
profile, public_did_info.verkey
)
except Exception:
await wallet_record.delete_record(session)
async with self._profile.session() as session:
await wallet_record.delete_record(session)
raise

return wallet_record
Expand Down
2 changes: 1 addition & 1 deletion aries_cloudagent/wallet/models/wallet_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def wallet_key(self) -> Optional[str]:
return self.settings.get("wallet.key")

@property
def wallet_key_derivation_method(self):
def wallet_key_derivation_method(self) -> Optional[str]:
"""Accessor for the key derivation method of the wallet."""
return self.settings.get("wallet.key_derivation_method")

Expand Down

0 comments on commit 87bb19c

Please sign in to comment.