Skip to content

Commit

Permalink
refactor: remove mediated connection and agency client (#1147)
Browse files Browse the repository at this point in the history
Signed-off-by: Ondrej Prazak <[email protected]>
Co-authored-by: Ondrej Prazak <[email protected]>
  • Loading branch information
xprazak2 and Ondrej Prazak authored Mar 14, 2024
1 parent a012338 commit 74ab042
Show file tree
Hide file tree
Showing 59 changed files with 48 additions and 4,704 deletions.
44 changes: 7 additions & 37 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ resolver = "2"

members = [
"aries/aries_vcx",
"aries/misc/legacy/agency_client",
"aries/misc/legacy/libvdrtools",
"aries/messages_macros",
"aries/messages",
Expand Down
1 change: 0 additions & 1 deletion aries/aries_vcx/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ askar_wallet = [
]

[dependencies]
agency_client = { path = "../misc/legacy/agency_client" }
messages = { path = "../messages" }
diddoc_legacy = { path = "../misc/legacy/diddoc_legacy" }
aries_vcx_core = { path = "../aries_vcx_core" }
Expand Down
2 changes: 1 addition & 1 deletion aries/aries_vcx/src/common/ledger/service_didsov.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ impl Default for EndpointDidSov {

#[cfg(test)]
mod unit_tests {
use agency_client::testing::test_utils::SetupMocks;
use diddoc_legacy::aries::diddoc::test_utils::{_routing_keys, _service_endpoint};
use test_utils::devsetup::SetupMocks;

use crate::common::ledger::service_didsov::{DidSovServiceType, EndpointDidSov};

Expand Down
32 changes: 0 additions & 32 deletions aries/aries_vcx/src/errors/mapping_agency_client.rs

This file was deleted.

1 change: 0 additions & 1 deletion aries/aries_vcx/src/errors/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
pub mod error;
mod mapping_agency_client;
mod mapping_diddoc;
mod mapping_others;
9 changes: 2 additions & 7 deletions aries/aries_vcx/src/handlers/issuance/holder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ use uuid::Uuid;
use crate::{
common::credentials::get_cred_rev_id,
errors::error::prelude::*,
handlers::{
mediated_connection::MediatedConnection,
revocation_notification::receiver::RevocationNotificationReceiver,
},
handlers::revocation_notification::receiver::RevocationNotificationReceiver,
protocols::issuance::holder::state_machine::{HolderFullState, HolderSM, HolderState},
};

Expand Down Expand Up @@ -242,17 +239,15 @@ impl Holder {
ledger: &impl AnoncredsLedgerRead,
anoncreds: &impl BaseAnonCreds,
wallet: &impl BaseWallet,
connection: &MediatedConnection,
notification: Revoke,
) -> VcxResult<()> {
if self.holder_sm.is_revokable(ledger).await? {
let send_message = connection.send_message_closure(wallet).await?;
// TODO: Store to remember notification was received along with details
RevocationNotificationReceiver::build(
self.get_rev_reg_id()?,
self.get_cred_rev_id(wallet, anoncreds).await?,
)
.handle_revocation_notification(notification, send_message)
.handle_revocation_notification(notification)
.await?;
Ok(())
} else {
Expand Down
Loading

0 comments on commit 74ab042

Please sign in to comment.