Skip to content

Commit

Permalink
wallet-core: Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Daksh14 committed Sep 9, 2024
1 parent c0e8a79 commit b9cae97
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
4 changes: 3 additions & 1 deletion rusk-wallet/src/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ impl<F: SecureWalletFile + Debug> Wallet<F> {
/// Returns phoenix key pair for a given address
///
/// # Errors
/// -
///
/// - If the Address provided is not a Phoenix address
/// - If the address is not owned
pub fn phoenix_keys(
&self,
addr: &Address,
Expand Down
14 changes: 13 additions & 1 deletion wallet-core/src/moonlight.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
//! Implementations of basic wallet functionalities to create moonlight
//! transactions.
#![allow(clippy::module_name_repetitions)]

use execution_core::{
signatures::bls::{PublicKey as BlsPublicKey, SecretKey as BlsSecretKey},
stake::{Stake, Withdraw as StakeWithdraw, STAKE_CONTRACT},
Expand Down Expand Up @@ -51,10 +53,15 @@ pub fn moonlight(
.into())
}

/// Stake through moonlight, the stake_nonce is the nonce of the stake
/// Stake through moonlight, the `stake_nonce` is the nonce of the stake
/// which is obtained via stake info query on the chain
///
/// The `nonce` is the nonce of the moonlight transaction
///
/// # Errors
///
/// This function most likey not fail but if the `nonce` is incorrect
/// or the `stake_nonce` the node will error and not accept the transcation
pub fn moonlight_stake(
from_sk: &BlsSecretKey,
stake_value: u64,
Expand Down Expand Up @@ -88,6 +95,11 @@ pub fn moonlight_stake(
}

/// Unstake through moonlight
///
/// # Errors
///
/// This function most likey not fail but if the `nonce` is incorrect
/// or the `stake_nonce` the node will error and not accept the transcation
pub fn moonlight_unstake<R: RngCore + CryptoRng>(
rng: &mut R,
from_sk: &BlsSecretKey,
Expand Down
2 changes: 2 additions & 0 deletions wallet-core/src/phoenix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
//! Implementations of basic wallet functionalities to create phoenix
//! transactions.
#![allow(clippy::module_name_repetitions)]

use alloc::vec::Vec;

use rand::{CryptoRng, RngCore};
Expand Down

0 comments on commit b9cae97

Please sign in to comment.