From 350ed9da518aff4c46b14cb409b6101532da1e07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dj8yf0=CE=BCl?= Date: Thu, 25 Jan 2024 21:21:41 +0200 Subject: [PATCH] chore: compile fix and fmt --- examples/common/lib.rs | 2 +- examples/sign_transaction/delete_account_long.rs | 1 + examples/sign_transaction/delete_key_ed25519.rs | 4 ++-- examples/sign_transaction/delete_key_secp256k1.rs | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/examples/common/lib.rs b/examples/common/lib.rs index 42deaa3..6f1a793 100644 --- a/examples/common/lib.rs +++ b/examples/common/lib.rs @@ -3,8 +3,8 @@ use std::str::FromStr; use ed25519_dalek::Signature; use ed25519_dalek::Verifier; -use near_primitives_core::{borsh, borsh::BorshSerialize, hash::CryptoHash, types::AccountId}; use near_ledger::NEARLedgerError; +use near_primitives_core::{borsh, borsh::BorshSerialize, hash::CryptoHash, types::AccountId}; use slip10::BIP32Path; pub fn display_pub_key(public_key: ed25519_dalek::PublicKey) { diff --git a/examples/sign_transaction/delete_account_long.rs b/examples/sign_transaction/delete_account_long.rs index b6a2a35..4b5e3ff 100644 --- a/examples/sign_transaction/delete_account_long.rs +++ b/examples/sign_transaction/delete_account_long.rs @@ -4,6 +4,7 @@ use near_ledger::NEARLedgerError; #[path = "../common/lib.rs"] mod common; +#[allow(deprecated)] fn tx(ledger_pub_key: ed25519_dalek::PublicKey) -> near_primitives::transaction::Transaction { let mut tx = common::tx_template(ledger_pub_key); tx.actions = vec![near_primitives::transaction::Action::DeleteAccount( diff --git a/examples/sign_transaction/delete_key_ed25519.rs b/examples/sign_transaction/delete_key_ed25519.rs index 88d2193..8672d0f 100644 --- a/examples/sign_transaction/delete_key_ed25519.rs +++ b/examples/sign_transaction/delete_key_ed25519.rs @@ -11,9 +11,9 @@ fn tx(ledger_pub_key: ed25519_dalek::PublicKey) -> near_primitives::transaction: &format!("{:?}", ledger_pub_key), ); let public_key = sk.public_key(); - tx.actions = vec![near_primitives::transaction::Action::DeleteKey( + tx.actions = vec![near_primitives::transaction::Action::DeleteKey(Box::new( near_primitives::transaction::DeleteKeyAction { public_key }, - )]; + ))]; tx } diff --git a/examples/sign_transaction/delete_key_secp256k1.rs b/examples/sign_transaction/delete_key_secp256k1.rs index 3cd0e94..ea7c722 100644 --- a/examples/sign_transaction/delete_key_secp256k1.rs +++ b/examples/sign_transaction/delete_key_secp256k1.rs @@ -11,9 +11,9 @@ fn tx(ledger_pub_key: ed25519_dalek::PublicKey) -> near_primitives::transaction: &format!("{:?}", ledger_pub_key), ); let public_key = sk.public_key(); - tx.actions = vec![near_primitives::transaction::Action::DeleteKey( + tx.actions = vec![near_primitives::transaction::Action::DeleteKey(Box::new( near_primitives::transaction::DeleteKeyAction { public_key }, - )]; + ))]; tx }