Skip to content

Commit

Permalink
Update vdr_reader to use the new IndyVdrLedger API
Browse files Browse the repository at this point in the history
Signed-off-by: Miroslav Kovar <miroslav.kovar@absa.africa>
  • Loading branch information
mirgee committed May 17, 2023
1 parent 6f29f05 commit e900ca2
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions did_resolver_sov/src/reader/vdr_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ use std::sync::Arc;

use crate::error::DidSovError;
use aries_vcx_core::{
ledger::indy_vdr_ledger::{IndyVdrLedger, IndyVdrLedgerPool, LedgerPoolConfig},
ledger::{
indy_vdr_ledger::IndyVdrLedger,
request_submitter::vdr_ledger::{IndyVdrLedgerPool, IndyVdrSubmitter, LedgerPoolConfig},
},
wallet::{base_wallet::BaseWallet, indy_wallet::IndySdkWallet},
INVALID_WALLET_HANDLE,
};
Expand All @@ -15,8 +18,8 @@ impl TryFrom<LedgerPoolConfig> for ConcreteAttrReader {
fn try_from(pool_config: LedgerPoolConfig) -> Result<Self, Self::Error> {
let wallet = Arc::new(IndySdkWallet::new(INVALID_WALLET_HANDLE)) as Arc<dyn BaseWallet>;
let ledger_pool = Arc::new(IndyVdrLedgerPool::new(pool_config)?);
Ok(Self {
ledger: Arc::new(IndyVdrLedger::new(Arc::clone(&wallet), ledger_pool)),
})
let submitter = Arc::new(IndyVdrSubmitter::new(ledger_pool));
let ledger = Arc::new(IndyVdrLedger::new(Arc::clone(&wallet), submitter));
Ok(Self { ledger })
}
}

0 comments on commit e900ca2

Please sign in to comment.