mirror of
https://github.com/aljazceru/cdk.git
synced 2026-02-18 03:26:25 +01:00
chore: clippy
This commit is contained in:
@@ -2,7 +2,7 @@ use std::{ops::Deref, sync::Arc};
|
||||
|
||||
use cashu::nuts::nut06::{SplitRequest as SplitRequestSdk, SplitResponse as SplitResponseSdk};
|
||||
|
||||
use crate::{Amount, BlindedMessage, BlindedMessages, BlindedSignature, Proof};
|
||||
use crate::{Amount, BlindedMessage, BlindedSignature, Proof};
|
||||
|
||||
pub struct SplitRequest {
|
||||
inner: SplitRequestSdk,
|
||||
|
||||
@@ -48,6 +48,7 @@ pub struct MintInfo {
|
||||
}
|
||||
|
||||
impl MintInfo {
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn new(
|
||||
name: Option<String>,
|
||||
pubkey: Option<Arc<PublicKey>>,
|
||||
|
||||
@@ -100,13 +100,13 @@ impl Error {
|
||||
let err = mint_res
|
||||
.error
|
||||
.as_deref()
|
||||
.or_else(|| mint_res.detail.as_deref())
|
||||
.or(mint_res.detail.as_deref())
|
||||
.unwrap_or_default();
|
||||
|
||||
let mint_error = match err {
|
||||
error if error.starts_with("Lightning invoice not paid yet.") => Error::InvoiceNotPaid,
|
||||
error if error.starts_with("Lightning wallet not responding") => {
|
||||
let mint = utils::extract_url_from_error(&error);
|
||||
let mint = utils::extract_url_from_error(error);
|
||||
Error::LightingWalletNotResponding(mint)
|
||||
}
|
||||
error => Error::Custom(error.to_owned()),
|
||||
|
||||
@@ -134,7 +134,7 @@ pub mod mint {
|
||||
impl KeyPair {
|
||||
pub fn from_secret_key(secret_key: SecretKey) -> Self {
|
||||
Self {
|
||||
public_key: secret_key.public_key().into(),
|
||||
public_key: secret_key.public_key(),
|
||||
secret_key,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user