mirror of
https://github.com/aljazceru/cdk.git
synced 2025-12-23 23:55:01 +01:00
fix: make capitalization of error messages consistent
This commit is contained in:
committed by
thesimplekid
parent
e8114f3383
commit
9eff00bcaf
@@ -9,7 +9,7 @@ pub enum Error {
|
||||
#[error("Unknown invoice amount")]
|
||||
UnknownInvoiceAmount,
|
||||
/// Wrong CLN response
|
||||
#[error("Wrong cln response")]
|
||||
#[error("Wrong CLN response")]
|
||||
WrongClnResponse,
|
||||
/// Unknown invoice
|
||||
#[error("Unknown invoice")]
|
||||
|
||||
@@ -47,13 +47,13 @@ pub enum Error {
|
||||
#[error(transparent)]
|
||||
CDKNUT00(#[from] cdk::nuts::nut00::Error),
|
||||
/// Unknown Mint Info
|
||||
#[error("Unknown Mint Info")]
|
||||
#[error("Unknown mint info")]
|
||||
UnknownMintInfo,
|
||||
/// Unknown Proof Y
|
||||
#[error("Unknown Proof Y")]
|
||||
#[error("Unknown proof Y")]
|
||||
UnknownY,
|
||||
/// Unknown Database Version
|
||||
#[error("Unknown Database Version")]
|
||||
#[error("Unknown database version")]
|
||||
UnknownDatabaseVersion,
|
||||
}
|
||||
|
||||
|
||||
@@ -32,8 +32,8 @@ pub enum Error {
|
||||
/// BIP32 Error
|
||||
#[error(transparent)]
|
||||
BIP32(#[from] bitcoin::bip32::Error),
|
||||
/// Could Not Initialize Db
|
||||
#[error("Could not initialize Db")]
|
||||
/// Could Not Initialize Database
|
||||
#[error("Could not initialize database")]
|
||||
CouldNotInitialize,
|
||||
/// Invalid Database Path
|
||||
#[error("Invalid database path")]
|
||||
|
||||
@@ -38,8 +38,8 @@ pub enum Error {
|
||||
/// BIP32 Error
|
||||
#[error(transparent)]
|
||||
BIP32(#[from] bitcoin::bip32::Error),
|
||||
/// Could Not Initialize Db
|
||||
#[error("Could not initialize Db")]
|
||||
/// Could Not Initialize Database
|
||||
#[error("Could not initialize database")]
|
||||
CouldNotInitialize,
|
||||
/// Invalid Database Path
|
||||
#[error("Invalid database path")]
|
||||
|
||||
@@ -42,7 +42,7 @@ pub enum Error {
|
||||
#[error("Unsupported unit")]
|
||||
UnsupportedUnit,
|
||||
/// Invalid Url
|
||||
#[error("Invalid Url")]
|
||||
#[error("Invalid URL")]
|
||||
InvalidUrl,
|
||||
/// Serde Json error
|
||||
#[error(transparent)]
|
||||
|
||||
@@ -19,7 +19,7 @@ use crate::{Amount, Bolt11Invoice};
|
||||
#[derive(Debug, Error)]
|
||||
pub enum Error {
|
||||
/// Unknown Quote State
|
||||
#[error("Unknown Quote State")]
|
||||
#[error("Unknown quote state")]
|
||||
UnknownState,
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ use super::nut01::PublicKey;
|
||||
#[derive(Debug, Error, PartialEq, Eq)]
|
||||
pub enum Error {
|
||||
/// Unknown State error
|
||||
#[error("Unknown State")]
|
||||
#[error("Unknown state")]
|
||||
UnknownState,
|
||||
}
|
||||
|
||||
|
||||
@@ -43,25 +43,25 @@ pub enum Error {
|
||||
#[error("Invalid signature")]
|
||||
InvalidSignature,
|
||||
/// Unknown tag in P2PK secret
|
||||
#[error("Unknown Tag P2PK secret")]
|
||||
#[error("Unknown tag P2PK secret")]
|
||||
UnknownTag,
|
||||
/// Unknown Sigflag
|
||||
#[error("Unknown Sigflag")]
|
||||
#[error("Unknown sigflag")]
|
||||
UnknownSigFlag,
|
||||
/// P2PK Spend conditions not meet
|
||||
#[error("P2PK Spend conditions are not met")]
|
||||
#[error("P2PK spend conditions are not met")]
|
||||
SpendConditionsNotMet,
|
||||
/// Pubkey must be in data field of P2PK
|
||||
#[error("P2PK Required in secret data")]
|
||||
#[error("P2PK required in secret data")]
|
||||
P2PKPubkeyRequired,
|
||||
/// Unknown Kind
|
||||
#[error("Kind not found")]
|
||||
KindNotFound,
|
||||
/// HTLC hash invalid
|
||||
#[error("Invalid Hash")]
|
||||
#[error("Invalid hash")]
|
||||
InvalidHash,
|
||||
/// Witness Signatures not provided
|
||||
#[error("Witness Signatures not provided")]
|
||||
#[error("Witness signatures not provided")]
|
||||
SignaturesNotProvided,
|
||||
/// Parse Url Error
|
||||
#[error(transparent)]
|
||||
|
||||
@@ -17,14 +17,14 @@ use crate::{Amount, SECP256K1};
|
||||
/// NUT12 Error
|
||||
#[derive(Debug, Error)]
|
||||
pub enum Error {
|
||||
/// Missing Dleq Proof
|
||||
#[error("No Dleq Proof provided")]
|
||||
/// Missing DLEQ Proof
|
||||
#[error("No DLEQ proof provided")]
|
||||
MissingDleqProof,
|
||||
/// Incomplete Dleq Proof
|
||||
#[error("Incomplete DLEQ Proof")]
|
||||
/// Incomplete DLEQ Proof
|
||||
#[error("Incomplete DLEQ proof")]
|
||||
IncompleteDleqProof,
|
||||
/// Invalid Dleq Proof
|
||||
#[error("Invalid Dleq Prood")]
|
||||
/// Invalid DLEQ Proof
|
||||
#[error("Invalid DLEQ proof")]
|
||||
InvalidDleqProof,
|
||||
/// Cashu Error
|
||||
#[error(transparent)]
|
||||
|
||||
@@ -28,7 +28,7 @@ pub enum Error {
|
||||
#[error("Locktime in past")]
|
||||
LocktimeInPast,
|
||||
/// Hash Required
|
||||
#[error("Hash Required")]
|
||||
#[error("Hash required")]
|
||||
HashRequired,
|
||||
/// Hash is not valid
|
||||
#[error("Hash is not valid")]
|
||||
|
||||
@@ -13,55 +13,55 @@ use crate::util::hex;
|
||||
#[derive(Debug, Error)]
|
||||
pub enum Error {
|
||||
/// Insufficient Funds
|
||||
#[error("Insufficient Funds")]
|
||||
#[error("Insufficient funds")]
|
||||
InsufficientFunds,
|
||||
/// Quote Expired
|
||||
#[error("Quote Expired")]
|
||||
#[error("Quote expired")]
|
||||
QuoteExpired,
|
||||
/// Unknown Quote
|
||||
#[error("Quote Unknown")]
|
||||
#[error("Quote unknown")]
|
||||
QuoteUnknown,
|
||||
/// Not active keyset
|
||||
#[error("No active keyset")]
|
||||
NoActiveKeyset,
|
||||
/// Invalid DLEQ prood
|
||||
#[error("Could not verify Dleq")]
|
||||
/// Invalid DLEQ proof
|
||||
#[error("Could not verify DLEQ proof")]
|
||||
CouldNotVerifyDleq,
|
||||
/// P2PK spending conditions not met
|
||||
#[error("P2PK Condition Not met `{0}`")]
|
||||
#[error("P2PK condition not met `{0}`")]
|
||||
P2PKConditionsNotMet(String),
|
||||
/// Invalid Spending Conditions
|
||||
#[error("Invalid Spending Conditions: `{0}`")]
|
||||
#[error("Invalid spending conditions: `{0}`")]
|
||||
InvalidSpendConditions(String),
|
||||
/// Preimage not provided
|
||||
#[error("Preimage not provided")]
|
||||
PreimageNotProvided,
|
||||
/// Unknown Key
|
||||
#[error("Unknown Key")]
|
||||
#[error("Unknown key")]
|
||||
UnknownKey,
|
||||
/// Spending Locktime not provided
|
||||
#[error("Spending condition locktime not provided")]
|
||||
LocktimeNotProvided,
|
||||
/// Unknown Keyset
|
||||
#[error("Url Path segments could not be joined")]
|
||||
/// Url path segments could not be joined
|
||||
#[error("Url path segments could not be joined")]
|
||||
UrlPathSegments,
|
||||
/// Quote not paid
|
||||
#[error("Quote not paid")]
|
||||
QuoteNotePaid,
|
||||
/// Token Already spent error
|
||||
#[error("Token Already Spent Error")]
|
||||
/// Token Already Spent
|
||||
#[error("Token already spent")]
|
||||
TokenAlreadySpent,
|
||||
/// Unit Not supported
|
||||
#[error("Unit not supported for method")]
|
||||
UnitNotSupported,
|
||||
/// Bolt11 invoice does not have amount
|
||||
#[error("Invoice Amount undefined")]
|
||||
#[error("Invoice amount undefined")]
|
||||
InvoiceAmountUndefined,
|
||||
/// Incorrect quote amount
|
||||
#[error("Incorrect quote amount")]
|
||||
IncorrectQuoteAmount,
|
||||
/// Keyset Not Found
|
||||
#[error("Keyset Not Found")]
|
||||
#[error("Keyset not found")]
|
||||
KeysetNotFound,
|
||||
/// Receive can only be used with tokens from single mint
|
||||
#[error("Multiple mint tokens not supported by receive. Please deconstruct the token and use receive with_proof")]
|
||||
@@ -74,16 +74,16 @@ pub enum Error {
|
||||
#[error(transparent)]
|
||||
ReqwestError(#[from] reqwest::Error),
|
||||
/// Unknown error response
|
||||
#[error("Unknown Error response: `{0}`")]
|
||||
#[error("Unknown error response: `{0}`")]
|
||||
UnknownErrorResponse(String),
|
||||
/// Hex Error
|
||||
#[error(transparent)]
|
||||
HexError(#[from] hex::Error),
|
||||
/// Unknown Wallet
|
||||
#[error("Unknown Wallet: `{0}`")]
|
||||
#[error("Unknown wallet: `{0}`")]
|
||||
UnknownWallet(WalletKey),
|
||||
/// Incorrect Wallet
|
||||
#[error("Incorrect Wallet: `{0}`")]
|
||||
#[error("Incorrect wallet: `{0}`")]
|
||||
IncorrectWallet(String),
|
||||
/// Max Fee Ecxeded
|
||||
#[error("Max fee exceeded")]
|
||||
|
||||
Reference in New Issue
Block a user