Skip to content

Commit

Permalink
fix: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
ngutech21 committed Nov 9, 2023
1 parent d717fc1 commit 5ec27c6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions crates/cashu-sdk/src/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ use crate::client::Client;

#[derive(Debug)]
pub enum Error {
/// Insufficaint Funds
InsufficantFunds,
/// Insufficient Funds
InsufficientFunds,
Cashu(cashu::error::wallet::Error),
Client(crate::client::Error),
Custom(String),
Expand All @@ -35,7 +35,7 @@ impl StdError for Error {}
impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Error::InsufficantFunds => write!(f, "Insufficant Funds"),
Error::InsufficientFunds => write!(f, "Insufficient Funds"),
Error::Cashu(err) => write!(f, "{}", err),
Error::Client(err) => write!(f, "{}", err),
Error::Custom(err) => write!(f, "{}", err),
Expand Down Expand Up @@ -341,7 +341,7 @@ impl Wallet {

if amount_available.lt(&amount) {
println!("Not enough funds");
return Err(Error::InsufficantFunds);
return Err(Error::InsufficientFunds);
}

// If amount available is EQUAL to send amount no need to split
Expand Down Expand Up @@ -403,7 +403,7 @@ impl Wallet {

if amount_available.lt(&amount) {
println!("Not enough funds");
return Err(Error::InsufficantFunds);
return Err(Error::InsufficientFunds);
}

// If amount available is EQUAL to send amount no need to split
Expand Down
6 changes: 3 additions & 3 deletions crates/cashu/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ pub mod wallet {
SerdeJsonError(serde_json::Error),
/// From elliptic curve
EllipticError(k256::elliptic_curve::Error),
/// Insufficaint Funds
InsufficantFunds,
/// Insufficient Funds
InsufficientFunds,
/// Utf8 parse error
Utf8ParseError(FromUtf8Error),
/// Base64 error
Expand All @@ -114,7 +114,7 @@ pub mod wallet {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Error::CustomError(err) => write!(f, "{}", err),
Error::InsufficantFunds => write!(f, "Insufficant Funds"),
Error::InsufficientFunds => write!(f, "Insufficient Funds"),
Error::Utf8ParseError(err) => write!(f, "{}", err),
Error::Base64Error(err) => write!(f, "{}", err),
Error::UnsupportedToken => write!(f, "Unsuppported Token"),
Expand Down

0 comments on commit 5ec27c6

Please sign in to comment.