diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c8164c6146..99cd7749e3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -554,7 +554,12 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - features: ["ledger_vdrtools,anoncreds_vdrtools", "ledger_indyvdr,anoncreds_credx"] + features: [ + "ledger_vdrtools,anoncreds_vdrtools", + "ledger_vdrtools,anoncreds_credx", + "ledger_indyvdr,anoncreds_vdrtools", + "ledger_indyvdr,anoncreds_credx" + ] steps: - name: "Git checkout" uses: actions/checkout@v3 diff --git a/libvcx_core/src/api_vcx/api_global/pool.rs b/libvcx_core/src/api_vcx/api_global/pool.rs index e041c26123..6d9506ac8b 100644 --- a/libvcx_core/src/api_vcx/api_global/pool.rs +++ b/libvcx_core/src/api_vcx/api_global/pool.rs @@ -19,9 +19,10 @@ use aries_vcx::aries_vcx_core::wallet::base_wallet::BaseWallet; #[cfg(feature = "ledger_indyvdr")] use aries_vcx::core::profile::modular_libs_profile::{indyvdr_build_ledger_read, indyvdr_build_ledger_write}; use aries_vcx::core::profile::profile::Profile; -use aries_vcx::errors::error::VcxResult; +use aries_vcx::errors::error::{AriesVcxError, VcxResult}; use std::sync::Arc; use std::sync::RwLock; +use aries_vcx::aries_vcx_core::errors::error::AriesVcxCoreError; lazy_static! { static ref POOL_HANDLE: RwLock> = RwLock::new(None); @@ -111,6 +112,10 @@ async fn build_components_ledger( let indy_write: Arc = ledger_write.clone(); return Ok((anoncreds_read, anoncreds_write, indy_read, indy_write)); } + #[cfg(not(any(feature = "ledger_indyvdr", feature = "ledger_vdrtools")))] + { + panic!("No ledger implementation has been selected by feature flag upon build"); + } } pub fn reset_ledger_components() -> LibvcxResult<()> { diff --git a/libvcx_core/src/api_vcx/api_global/wallet.rs b/libvcx_core/src/api_vcx/api_global/wallet.rs index b7ee5ac086..092008e38c 100644 --- a/libvcx_core/src/api_vcx/api_global/wallet.rs +++ b/libvcx_core/src/api_vcx/api_global/wallet.rs @@ -53,6 +53,10 @@ fn build_component_anoncreds(base_wallet: Arc) -> Arc LibvcxResult<()> {