From 9f05b8e3d643091ca81c0e93fc2edae95cd43c2f Mon Sep 17 00:00:00 2001 From: Fran Domovic Date: Mon, 2 Dec 2024 16:11:00 +0100 Subject: [PATCH] fix: lint --- .../context/config/src/client/protocol/icp.rs | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/crates/context/config/src/client/protocol/icp.rs b/crates/context/config/src/client/protocol/icp.rs index 3cb35c227..6390d3366 100644 --- a/crates/context/config/src/client/protocol/icp.rs +++ b/crates/context/config/src/client/protocol/icp.rs @@ -2,27 +2,24 @@ use std::borrow::Cow; use std::collections::BTreeMap; use ed25519_consensus::SigningKey; +use ed25519_dalek::{Signer, SigningKey as DSigningKey}; use ic_agent::agent::CallResponse; use ic_agent::export::Principal; use ic_agent::Agent; - +use rand::rngs::OsRng; use serde::{Deserialize, Serialize}; use thiserror::Error; use url::Url; use super::Protocol; +use crate::client::env::config::types::icp::{ + ICApplication, ICApplicationId, ICBlobId, ICContextId, ICContextIdentity, ICPContextRequest, + ICPContextRequestKind, ICPRequest, ICPRequestKind, ICPSigned, ICSignerId, +}; use crate::client::transport::{ AssociatedTransport, Operation, ProtocolTransport, TransportRequest, }; -use crate::client::env::config::types::icp::{ - ICApplication, ICApplicationId, ICBlobId, ICContextId, ICContextIdentity, ICSignerId, - ICPContextRequestKind, ICPRequest, ICPRequestKind, ICPContextRequest, ICPSigned -}; -use rand::rngs::OsRng; - -use ed25519_dalek::{Signer, SigningKey as DSigningKey}; - #[derive(Copy, Clone, Debug)] pub enum Icp {} @@ -248,9 +245,8 @@ impl Network { timestamp_ms: current_time, }; - let sign_req = ICPSigned::new(request, |bytes| sign_key.sign(bytes)) - .expect("Failed to create signed request"); - + let sign_req = ICPSigned::new(request, |bytes| sign_key.sign(bytes)) + .expect("Failed to create signed request"); let args_encoded = candid::encode_one(sign_req).unwrap(); self.client