Merge pull request #45 from ngutech21/fix-typo

fix: typo insufficient funds
This commit is contained in:
thesimplekid
2023-11-09 07:29:28 +00:00
committed by GitHub
2 changed files with 8 additions and 8 deletions

View File

@@ -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),
@@ -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),
@@ -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
@@ -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

View File

@@ -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
@@ -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"),