diff --git a/contracts/icp/context-config/src/types.rs b/contracts/icp/context-config/src/types.rs index b94ee61b7..04dae3fb2 100644 --- a/contracts/icp/context-config/src/types.rs +++ b/contracts/icp/context-config/src/types.rs @@ -304,7 +304,7 @@ impl ICPSigned { F: FnOnce(&[u8]) -> R, { let bytes = serde_json::to_vec(&payload)?; - + let signature = sign(&bytes) .into_result() .map_err(ICPSignedError::DerivationError)?; @@ -322,7 +322,7 @@ impl ICPSigned { F: FnOnce(&T) -> R, { let parsed: T = serde_json::from_slice(&self.payload)?; - + let signer_id = f(&parsed) .into_result() .map_err(ICPSignedError::DerivationError)?; diff --git a/contracts/icp/context-config/tests/integration.rs b/contracts/icp/context-config/tests/integration.rs index afeee9fa6..273d5a42f 100644 --- a/contracts/icp/context-config/tests/integration.rs +++ b/contracts/icp/context-config/tests/integration.rs @@ -27,10 +27,10 @@ fn setup() -> (PocketIc, Principal) { } fn create_signed_request(signer_key: &SigningKey, request: Request) -> ICPSigned { - ICPSigned::new( - request, - |bytes| Ok::<_, std::convert::Infallible>(signer_key.sign(bytes).to_vec()) - ).expect("Failed to create signed request") + ICPSigned::new(request, |bytes| { + Ok::<_, std::convert::Infallible>(signer_key.sign(bytes).to_vec()) + }) + .expect("Failed to create signed request") } fn get_time_nanos(pic: &PocketIc) -> u64 {