Skip to content

Commit

Permalink
Use extra fields from did_doc_sov in did_resolver_sov
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 Jun 7, 2023
1 parent acc3450 commit 95056f1
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 98 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions did_resolver_sov/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ modular_libs = ["aries_vcx_core/modular_libs"]
[dependencies]
did_resolver = { path = "../did_resolver" }
aries_vcx_core = { path = "../aries_vcx_core" }
did_doc_sov = { path = "../did_doc_sov" }
async-trait = "0.1.68"
mockall = "0.11.4"
serde_json = "1.0.96"
Expand Down
90 changes: 0 additions & 90 deletions did_resolver_sov/src/resolution/extra_fields.rs

This file was deleted.

2 changes: 0 additions & 2 deletions did_resolver_sov/src/resolution/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
mod extra_fields;
mod resolver;
mod utils;

pub use extra_fields::ExtraFieldsSov;
pub use resolver::DidSovResolver;
9 changes: 3 additions & 6 deletions did_resolver_sov/src/resolution/resolver.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::sync::Arc;

use async_trait::async_trait;
use did_doc_sov::extra_fields::ExtraFields;
use did_resolver::{
did_parser::Did,
error::GenericError,
Expand All @@ -17,10 +18,7 @@ use crate::{
reader::AttrReader,
};

use super::{
utils::{is_valid_sovrin_did_id, ledger_response_to_ddo},
ExtraFieldsSov,
};
use super::utils::{is_valid_sovrin_did_id, ledger_response_to_ddo};

pub struct DidSovResolver {
ledger: Arc<dyn AttrReader>,
Expand All @@ -34,8 +32,7 @@ impl DidSovResolver {

#[async_trait]
impl DidResolvable for DidSovResolver {
// TODO: Change to ExtraFields from Sovrin-specific DDO wrapper
type ExtraFields = ();
type ExtraFields = ExtraFields;

async fn resolve(
&self,
Expand Down

0 comments on commit 95056f1

Please sign in to comment.