From 3321e6add796ee481252a1d43a48ea728a6f2e6d Mon Sep 17 00:00:00 2001 From: alenmestrov Date: Sun, 1 Dec 2024 18:37:31 +0100 Subject: [PATCH 1/2] fix: removed wrong as_bytes --- contracts/icp/context-config/src/types.rs | 4 ---- contracts/icp/context-config/tests/integration.rs | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/contracts/icp/context-config/src/types.rs b/contracts/icp/context-config/src/types.rs index da3c2adff..7c60d49a9 100644 --- a/contracts/icp/context-config/src/types.rs +++ b/contracts/icp/context-config/src/types.rs @@ -97,10 +97,6 @@ impl ICContextId { pub fn new(bytes: [u8; 32]) -> Self { Self(Identity(bytes)) } - - pub fn as_bytes(&self) -> [u8; 32] { - self.0.as_bytes() - } } impl ReprBytes for ICContextId { diff --git a/contracts/icp/context-config/tests/integration.rs b/contracts/icp/context-config/tests/integration.rs index 99bd68262..00fb0d91c 100644 --- a/contracts/icp/context-config/tests/integration.rs +++ b/contracts/icp/context-config/tests/integration.rs @@ -5,6 +5,7 @@ use context_contract::types::{ ContextRequest, ContextRequestKind, ICApplication, ICApplicationId, ICBlobId, ICCapability, ICContextId, ICContextIdentity, ICPSigned, ICSignerId, Request, RequestKind, }; +use calimero_context_config::repr::ReprBytes; use ed25519_dalek::{Signer, SigningKey}; use pocket_ic::{PocketIc, WasmResult}; use rand::Rng; From bd54748b8340387b95884287c1df5f6a24fd0ec5 Mon Sep 17 00:00:00 2001 From: alenmestrov Date: Sun, 1 Dec 2024 18:38:56 +0100 Subject: [PATCH 2/2] fix: lint --- contracts/icp/context-config/tests/integration.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/icp/context-config/tests/integration.rs b/contracts/icp/context-config/tests/integration.rs index 00fb0d91c..d85fb79bb 100644 --- a/contracts/icp/context-config/tests/integration.rs +++ b/contracts/icp/context-config/tests/integration.rs @@ -1,11 +1,11 @@ use std::time::{Duration, SystemTime, UNIX_EPOCH}; +use calimero_context_config::repr::ReprBytes; use candid::Principal; use context_contract::types::{ ContextRequest, ContextRequestKind, ICApplication, ICApplicationId, ICBlobId, ICCapability, ICContextId, ICContextIdentity, ICPSigned, ICSignerId, Request, RequestKind, }; -use calimero_context_config::repr::ReprBytes; use ed25519_dalek::{Signer, SigningKey}; use pocket_ic::{PocketIc, WasmResult}; use rand::Rng;