From 4eb7d3859c7d116c1898bff9c0a00d4d6ed0146c Mon Sep 17 00:00:00 2001 From: alenmestrov Date: Wed, 4 Dec 2024 14:28:51 +0100 Subject: [PATCH] fixed build scripts, ajdusted external mock contract to return the value --- contracts/icp/proxy-contract/build_mock_contracts.sh | 3 +++ contracts/icp/proxy-contract/mock/external/src/lib.rs | 8 ++++---- scripts/test.sh | 1 - 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/contracts/icp/proxy-contract/build_mock_contracts.sh b/contracts/icp/proxy-contract/build_mock_contracts.sh index 204fd5118..a8d9cecd8 100755 --- a/contracts/icp/proxy-contract/build_mock_contracts.sh +++ b/contracts/icp/proxy-contract/build_mock_contracts.sh @@ -11,3 +11,6 @@ echo "Building mock ledger contract..." echo "Building mock external contract..." ./mock/external/build.sh + +echo "Building context-config contract..." +../context-config/build.sh diff --git a/contracts/icp/proxy-contract/mock/external/src/lib.rs b/contracts/icp/proxy-contract/mock/external/src/lib.rs index a73ef1075..ca10b9152 100644 --- a/contracts/icp/proxy-contract/mock/external/src/lib.rs +++ b/contracts/icp/proxy-contract/mock/external/src/lib.rs @@ -6,10 +6,10 @@ thread_local! { #[ic_cdk::update] fn test_method(args: Vec) -> Vec { - CALLS.with(|calls| { - calls.borrow_mut().push(args.clone()); - args // Return the same args back - }) + CALLS.with(|calls| { + calls.borrow_mut().push(args.clone()); + args // Return the same args back + }) } #[ic_cdk::query] diff --git a/scripts/test.sh b/scripts/test.sh index 1dd1cda2b..5e31fbef4 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -14,6 +14,5 @@ cd "$(dirname $0)" ../contracts/proxy-lib/build-test-deps.sh ../contracts/icp/context-config/build.sh ../contracts/icp/proxy-contract/build_mock_contracts.sh -../contracts/icp/proxy-contract/build.sh # Run cargo test cargo test