Skip to content

Commit

Permalink
fix: allow re-creation agent wallet
Browse files Browse the repository at this point in the history
Signed-off-by: Pritam Singh <pkspritam16@gmail.com>
  • Loading branch information
Zzocker committed May 14, 2024
1 parent 05421cd commit 9a29c94
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions aries/agents/aries-vcx-agent/src/agent/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use aries_vcx::{
use aries_vcx_anoncreds::{
self,
anoncreds::{base_anoncreds::BaseAnonCreds, credx_anoncreds::IndyCredxAnonCreds},
errors::error::VcxAnoncredsError,
};
use aries_vcx_ledger::ledger::indy_vdr_ledger::{
build_ledger_components, DefaultIndyLedgerRead, VcxPoolConfig,
Expand Down Expand Up @@ -64,10 +65,16 @@ pub async fn build_indy_wallet(
let config_issuer = wallet.configure_issuer(&isser_seed).await.unwrap();

let anoncreds = IndyCredxAnonCreds;
anoncreds

if let Err(err) = anoncreds
.prover_create_link_secret(&wallet, &DEFAULT_LINK_SECRET_ALIAS.to_string())
.await
.unwrap();
{
match err {
VcxAnoncredsError::DuplicationMasterSecret(_) => {} // ignore
_ => panic!("{}", err),
};
}

(wallet, config_issuer)
}
Expand Down

0 comments on commit 9a29c94

Please sign in to comment.