Skip to content

Commit

Permalink
remove WithdrawError
Browse files Browse the repository at this point in the history
  • Loading branch information
brentstone committed Aug 8, 2024
1 parent 1aa722a commit 2858dbc
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions crates/proof_of_stake/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use namada_core::storage::Epoch;
use thiserror::Error;

use crate::rewards;
use crate::types::{BondId, ValidatorState};
use crate::types::ValidatorState;

#[allow(missing_docs)]
#[derive(Error, Debug)]
Expand Down Expand Up @@ -67,15 +67,6 @@ pub enum UnbondError {
ValidatorIsFrozen(Address),
}

#[allow(missing_docs)]
#[derive(Error, Debug)]
pub enum WithdrawError {
#[error("No unbond could be found for {0}")]
NoUnbondFound(BondId),
#[error("No unbond may be withdrawn yet for {0}")]
NoWithdrawableUnbond(BondId),
}

#[allow(missing_docs)]
#[derive(Error, Debug)]
pub enum SlashError {
Expand Down Expand Up @@ -194,12 +185,6 @@ impl From<UnbondError> for namada_storage::Error {
}
}

impl From<WithdrawError> for namada_storage::Error {
fn from(err: WithdrawError) -> Self {
Self::new(err)
}
}

impl From<CommissionRateChangeError> for namada_storage::Error {
fn from(err: CommissionRateChangeError) -> Self {
Self::new(err)
Expand Down

0 comments on commit 2858dbc

Please sign in to comment.