Skip to content

Commit

Permalink
Minor Clippy/Test fixes
Browse files Browse the repository at this point in the history
Signed-off-by: lli <[email protected]>
  • Loading branch information
lukewli-anonyome committed Jul 25, 2024
1 parent cae1399 commit a65a52c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ impl HarnessAgent {
let (thid, pthid, my_did, their_did) = self
.aries_agent
.did_exchange()
.handle_msg_request(request, &inviter_key, opt_invitation)
.handle_msg_request(request, &inviter_key.clone(), opt_invitation)
.await?;

if let Some(pthid) = pthid {
Expand Down
1 change: 1 addition & 0 deletions aries/agents/aath-backchannel/src/controllers/issuance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ async fn download_tails_file(
let url = match tails_base_url.to_string().matches('/').count() {
0 => format!("{}/{}", tails_base_url, rev_reg_id),
1.. => tails_base_url.to_string(),
_ => todo!(),
};
let client = reqwest::Client::new();
let tails_folder_path = std::env::current_dir()
Expand Down
2 changes: 1 addition & 1 deletion aries/agents/aries-vcx-agent/src/handlers/did_exchange.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ impl<T: BaseWallet> DidcommHandlerDidExchange<T> {
pub async fn handle_msg_request(
&self,
request: AnyRequest,
request_did: &String,
request_did: &str,
invitation: Option<OobInvitation>,
) -> AgentResult<(String, Option<String>, String, String)> {
// todo: type the return type
Expand Down
4 changes: 2 additions & 2 deletions aries/aries_vcx/src/protocols/did_exchange/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ pub async fn resolve_enc_key_from_invitation(
}

pub async fn resolve_enc_key_from_did(
did: &String,
did: &str,
resolver_registry: &Arc<ResolverRegistry>,
) -> Result<Key, AriesVcxError> {
let output = resolver_registry
.resolve(&did.clone().try_into()?, &Default::default())
.resolve(&did.try_into()?, &Default::default())
.await
.map_err(|err| {
AriesVcxError::from_msg(
Expand Down
4 changes: 2 additions & 2 deletions aries/aries_vcx/tests/test_did_exchange.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ async fn did_exchange_test(
&resolver_registry,
request,
&responders_peer_did,
Some(invitation_key.clone()),
invitation_key.clone(),
)
.await
.unwrap();
Expand Down Expand Up @@ -337,7 +337,7 @@ async fn did_exchange_test_with_invalid_rotation_signature() -> Result<(), Box<d
request,
&responders_peer_did,
// sign with NOT the invitation key
Some(incorrect_invitation_key),
incorrect_invitation_key,
)
.await?;

Expand Down

0 comments on commit a65a52c

Please sign in to comment.