From e5680ce0d5db60ccffe77b8b9639bb954cb29c2b Mon Sep 17 00:00:00 2001 From: Alain Brenzikofer Date: Fri, 25 Oct 2024 10:31:11 +0200 Subject: [PATCH] clippy&taplo --- app-libs/stf/Cargo.toml | 2 +- app-libs/stf/src/trusted_call.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app-libs/stf/Cargo.toml b/app-libs/stf/Cargo.toml index a1c042668..d6e1ef08f 100644 --- a/app-libs/stf/Cargo.toml +++ b/app-libs/stf/Cargo.toml @@ -15,8 +15,8 @@ sha3 = { version = "0.10", default-features = false } sgx_tstd = { branch = "master", features = ["untrusted_fs", "net", "backtrace"], git = "https://github.com/apache/teaclave-sgx-sdk.git", optional = true } # local crates -ita-sgx-runtime = { default-features = false, path = "../sgx-runtime" } ita-parentchain-specs = { default-features = false, path = "../parentchain-specs" } +ita-sgx-runtime = { default-features = false, path = "../sgx-runtime" } itp-hashing = { default-features = false, path = "../../core-primitives/hashing" } itp-node-api = { default-features = false, path = "../../core-primitives/node-api" } itp-node-api-metadata = { default-features = false, path = "../../core-primitives/node-api/metadata" } diff --git a/app-libs/stf/src/trusted_call.rs b/app-libs/stf/src/trusted_call.rs index 6cf15d804..542fac2f4 100644 --- a/app-libs/stf/src/trusted_call.rs +++ b/app-libs/stf/src/trusted_call.rs @@ -289,7 +289,7 @@ where Ok::<(), Self::Error>(()) }, TrustedCall::balance_transfer(from, to, value) => { - let origin = ita_sgx_runtime::RuntimeOrigin::signed(from.clone()); + let origin = ita_sgx_runtime::RuntimeOrigin::signed(from); std::println!("⣿STF⣿ 🔄 balance_transfer from ⣿⣿⣿ to ⣿⣿⣿ amount ⣿⣿⣿"); ita_sgx_runtime::BalancesCall::::transfer { dest: MultiAddress::Id(to), @@ -573,7 +573,7 @@ fn get_fee_for(tc: &TrustedCallSigned) -> Balance { match &tc.call { TrustedCall::balance_transfer(..) => one / crate::STF_TX_FEE_UNIT_DIVIDER, TrustedCall::balance_unshield(..) => one / crate::STF_TX_FEE_UNIT_DIVIDER * 3, - TrustedCall::guess_the_number(call) => crate::guess_the_number::get_fee_for(&call), + TrustedCall::guess_the_number(call) => crate::guess_the_number::get_fee_for(call), _ => Balance::from(0u32), } }