Skip to content

Commit f797bf2

Browse files
authored
Merge pull request #45 from ngutech21/fix-typo
fix: typo insufficient funds
2 parents d717fc1 + 5ec27c6 commit f797bf2

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

crates/cashu-sdk/src/wallet.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ use crate::client::Client;
2323

2424
#[derive(Debug)]
2525
pub enum Error {
26-
/// Insufficaint Funds
27-
InsufficantFunds,
26+
/// Insufficient Funds
27+
InsufficientFunds,
2828
Cashu(cashu::error::wallet::Error),
2929
Client(crate::client::Error),
3030
Custom(String),
@@ -35,7 +35,7 @@ impl StdError for Error {}
3535
impl fmt::Display for Error {
3636
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3737
match self {
38-
Error::InsufficantFunds => write!(f, "Insufficant Funds"),
38+
Error::InsufficientFunds => write!(f, "Insufficient Funds"),
3939
Error::Cashu(err) => write!(f, "{}", err),
4040
Error::Client(err) => write!(f, "{}", err),
4141
Error::Custom(err) => write!(f, "{}", err),
@@ -341,7 +341,7 @@ impl Wallet {
341341

342342
if amount_available.lt(&amount) {
343343
println!("Not enough funds");
344-
return Err(Error::InsufficantFunds);
344+
return Err(Error::InsufficientFunds);
345345
}
346346

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

404404
if amount_available.lt(&amount) {
405405
println!("Not enough funds");
406-
return Err(Error::InsufficantFunds);
406+
return Err(Error::InsufficientFunds);
407407
}
408408

409409
// If amount available is EQUAL to send amount no need to split

crates/cashu/src/error.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ pub mod wallet {
9292
SerdeJsonError(serde_json::Error),
9393
/// From elliptic curve
9494
EllipticError(k256::elliptic_curve::Error),
95-
/// Insufficaint Funds
96-
InsufficantFunds,
95+
/// Insufficient Funds
96+
InsufficientFunds,
9797
/// Utf8 parse error
9898
Utf8ParseError(FromUtf8Error),
9999
/// Base64 error
@@ -114,7 +114,7 @@ pub mod wallet {
114114
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
115115
match self {
116116
Error::CustomError(err) => write!(f, "{}", err),
117-
Error::InsufficantFunds => write!(f, "Insufficant Funds"),
117+
Error::InsufficientFunds => write!(f, "Insufficient Funds"),
118118
Error::Utf8ParseError(err) => write!(f, "{}", err),
119119
Error::Base64Error(err) => write!(f, "{}", err),
120120
Error::UnsupportedToken => write!(f, "Unsuppported Token"),

0 commit comments

Comments
 (0)