From d1d973088b80a89dd188ea29e8b9b6ae5bfd2977 Mon Sep 17 00:00:00 2001 From: Swapnil Tripathi Date: Wed, 11 Oct 2023 10:22:07 +0530 Subject: [PATCH] remove unwrap() --- uniffi_aries_vcx/core/src/handlers/holder.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/uniffi_aries_vcx/core/src/handlers/holder.rs b/uniffi_aries_vcx/core/src/handlers/holder.rs index bd0249b568..db65f3f337 100644 --- a/uniffi_aries_vcx/core/src/handlers/holder.rs +++ b/uniffi_aries_vcx/core/src/handlers/holder.rs @@ -69,16 +69,13 @@ impl Holder { anoncreds: &impl BaseAnonCreds, my_pw_did: String, ) -> VcxUniFFIResult<()> { - // FIXME: remove .unwrap() block_on(async { self.handler - .lock() - .unwrap() + .lock()? .prepare_credential_request(ledger, anoncreds, my_pw_did) - .await - .unwrap(); - }); - Ok(()) + .await?; + Ok(()) + }) } pub fn get_msg_credential_request(&self) -> VcxUniFFIResult {