From 6482a6159184b5500c96491660028289cb0bb645 Mon Sep 17 00:00:00 2001 From: alenmestrov Date: Wed, 4 Dec 2024 14:17:00 +0100 Subject: [PATCH] fix: external call --- contracts/icp/proxy-contract/Cargo.toml | 2 +- contracts/icp/proxy-contract/mock/external/src/lib.rs | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/contracts/icp/proxy-contract/Cargo.toml b/contracts/icp/proxy-contract/Cargo.toml index e6083d922..a851e8d8d 100644 --- a/contracts/icp/proxy-contract/Cargo.toml +++ b/contracts/icp/proxy-contract/Cargo.toml @@ -9,7 +9,7 @@ crate-type = ["cdylib", "rlib"] [dependencies] bs58.workspace = true calimero-context-config = { path = "../../../crates/context/config" } -candid = "0.10" +candid = { version = "0.10", features = ["value"] } ed25519-dalek.workspace = true hex.workspace = true ic-cdk = "0.16" diff --git a/contracts/icp/proxy-contract/mock/external/src/lib.rs b/contracts/icp/proxy-contract/mock/external/src/lib.rs index 0386ddead..a73ef1075 100644 --- a/contracts/icp/proxy-contract/mock/external/src/lib.rs +++ b/contracts/icp/proxy-contract/mock/external/src/lib.rs @@ -5,10 +5,11 @@ thread_local! { } #[ic_cdk::update] -fn test_method(args: Vec) { - CALLS.with(|calls| { - calls.borrow_mut().push(args); - }); +fn test_method(args: Vec) -> Vec { + CALLS.with(|calls| { + calls.borrow_mut().push(args.clone()); + args // Return the same args back + }) } #[ic_cdk::query]