From 0f0b644819b8463db44aa7e4aa352afb62d73432 Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Mon, 24 Jun 2024 03:27:49 +0300 Subject: [PATCH] chore: cleanup (#404) --- Cargo.lock | 21 ------------------- Cargo.toml | 2 -- crates/network/src/stream/codec.rs | 3 ++- crates/sdk/src/env/ext.rs | 3 +-- .../src/admin/handlers/add_client_key.rs | 2 +- crates/server/src/admin/service.rs | 3 +-- 6 files changed, 5 insertions(+), 29 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ae3980dfd..0b0ffdea4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3145,16 +3145,6 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" -[[package]] -name = "leaderboard" -version = "0.1.0" -dependencies = [ - "near-sdk", - "near-workspaces", - "serde_json", - "tokio", -] - [[package]] name = "leb128" version = "0.2.5" @@ -5793,17 +5783,6 @@ dependencies = [ "rustc-hex", ] -[[package]] -name = "rock-paper-scissors" -version = "0.1.0" -dependencies = [ - "bs58 0.5.1", - "calimero-sdk", - "ed25519-dalek", - "rand_chacha 0.3.1", - "sha3", -] - [[package]] name = "rocksdb" version = "0.22.0" diff --git a/Cargo.toml b/Cargo.toml index 56526d910..e09105b21 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,10 +23,8 @@ members = [ "./apps/kv-store", "./apps/only-peers", - "./apps/rock-paper-scissors", "./contracts/package-manager", - "./contracts/leaderboard", ] [workspace.dependencies] diff --git a/crates/network/src/stream/codec.rs b/crates/network/src/stream/codec.rs index dd2b3e739..337ab5f5f 100644 --- a/crates/network/src/stream/codec.rs +++ b/crates/network/src/stream/codec.rs @@ -49,11 +49,12 @@ impl Encoder for MessageJsonCodec { #[cfg(test)] mod tests { - use super::*; use futures_util::StreamExt; use tokio_test::io::Builder; use tokio_util::codec::FramedRead; + use super::*; + #[test] fn test_my_frame_encoding_decoding() { let request = Message { diff --git a/crates/sdk/src/env/ext.rs b/crates/sdk/src/env/ext.rs index 182dd4c98..ef2d60a48 100644 --- a/crates/sdk/src/env/ext.rs +++ b/crates/sdk/src/env/ext.rs @@ -1,6 +1,5 @@ -use crate::sys; - use super::{expected_boolean, expected_register, panic_str, read_register, DATA_REGISTER}; +use crate::sys; #[doc(hidden)] pub unsafe fn fetch( diff --git a/crates/server/src/admin/handlers/add_client_key.rs b/crates/server/src/admin/handlers/add_client_key.rs index 22139d454..8caf2e7d2 100644 --- a/crates/server/src/admin/handlers/add_client_key.rs +++ b/crates/server/src/admin/handlers/add_client_key.rs @@ -92,7 +92,7 @@ pub fn store_client_key( wallet_type: WalletType::NEAR, signing_key: req.payload.message.public_key.clone(), created_at: Utc::now().timestamp_millis() as u64, - context_id: req.context_id.clone() + context_id: req.context_id.clone(), }; add_client_key(&store, client_key).map_err(|e| parse_api_error(e))?; info!("Client key stored successfully."); diff --git a/crates/server/src/admin/service.rs b/crates/server/src/admin/service.rs index 7a5ca3ea8..dcb3e5686 100644 --- a/crates/server/src/admin/service.rs +++ b/crates/server/src/admin/service.rs @@ -14,9 +14,8 @@ use serde_json::json; use tower_sessions::{MemoryStore, SessionManagerLayer}; use tracing::info; -use crate::middleware; - use super::handlers; +use crate::middleware; #[derive(Debug, Serialize, Deserialize)] pub struct AdminConfig {