remove unnecessary #[allow(dead_code)]
Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
@@ -22,7 +22,6 @@ pub enum WalletState<'a> {
|
||||
},
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn get_wallet_for_mut<'a>(
|
||||
accounts: &'a mut Accounts,
|
||||
global_wallet: &'a mut GlobalWallet,
|
||||
@@ -151,14 +150,12 @@ impl TokenSerializable for Wallet {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub struct GlobalWallet {
|
||||
pub wallet: Option<Wallet>,
|
||||
pub ui_state: WalletUIState,
|
||||
wallet_handler: TokenHandler,
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
impl GlobalWallet {
|
||||
pub fn new(path: &DataPath) -> Self {
|
||||
let wallet_handler =
|
||||
|
||||
@@ -13,7 +13,6 @@ use super::{
|
||||
|
||||
type ZapId = u32;
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[derive(Default)]
|
||||
pub struct Zaps {
|
||||
next_id: ZapId,
|
||||
@@ -26,7 +25,6 @@ pub struct Zaps {
|
||||
events: Vec<EventResponse>,
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn process_event(
|
||||
id: ZapId,
|
||||
event: ZapEvent,
|
||||
@@ -125,7 +123,6 @@ fn process_new_zap_event(
|
||||
NextState::Transition(promise)
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn send_note_zap(
|
||||
ndb: &Ndb,
|
||||
txn: &Transaction,
|
||||
@@ -208,7 +205,6 @@ struct EventResponse {
|
||||
event: Result<ZapEvent, ZappingError>,
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
impl Zaps {
|
||||
fn get_next_id(&mut self) -> ZapId {
|
||||
let next = self.next_id;
|
||||
@@ -405,7 +401,6 @@ pub enum AnyZapState {
|
||||
Confirmed,
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[derive(Debug)]
|
||||
pub enum ZapState {
|
||||
Confirm(Zap),
|
||||
@@ -446,7 +441,6 @@ pub struct ZapCtx {
|
||||
msats: u64,
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum ZapEvent {
|
||||
FetchInvoice {
|
||||
@@ -464,7 +458,6 @@ pub enum ZapEvent {
|
||||
},
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum ZappingError {
|
||||
InvoiceFetchFailed(ZapError),
|
||||
@@ -552,22 +545,20 @@ impl PromiseResponse {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Hash)]
|
||||
pub enum ZapTargetOwned {
|
||||
Profile(Pubkey),
|
||||
Note(NoteZapTargetOwned),
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[derive(Debug, Hash)]
|
||||
pub enum ZapTarget<'a> {
|
||||
Profile(&'a [u8; 32]),
|
||||
Note(NoteZapTarget<'a>),
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
impl ZapTargetOwned {
|
||||
#[allow(dead_code)]
|
||||
pub fn pubkey(&self) -> &Pubkey {
|
||||
match &self {
|
||||
ZapTargetOwned::Profile(pubkey) => pubkey,
|
||||
@@ -576,7 +567,6 @@ impl ZapTargetOwned {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Hash)]
|
||||
pub struct NoteZapTargetOwned {
|
||||
pub note_id: NoteId,
|
||||
|
||||
@@ -6,7 +6,6 @@ use serde::Deserialize;
|
||||
use tokio::task::JoinError;
|
||||
use url::Url;
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub struct FetchedInvoice {
|
||||
pub invoice: String,
|
||||
pub request_noteid: NoteId, // note id of kind 9734 request
|
||||
@@ -100,21 +99,24 @@ fn make_kind_9734<'a>(
|
||||
builder.sign(sender_nsec).build().expect("note")
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct LNUrlPayRequest {
|
||||
#[allow(dead_code)]
|
||||
#[serde(rename = "allowsNostr")]
|
||||
allow_nostr: bool,
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[serde(rename = "nostrPubkey")]
|
||||
nostr_pubkey: String,
|
||||
|
||||
#[serde(rename = "callback")]
|
||||
callback_url: String,
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[serde(rename = "minSendable")]
|
||||
min_sendable: u64,
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[serde(rename = "maxSendable")]
|
||||
max_sendable: u64,
|
||||
}
|
||||
@@ -143,7 +145,6 @@ fn endpoint_query_for_invoice<'a>(
|
||||
.finish())
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn fetch_invoice_lud16(
|
||||
lud16: String,
|
||||
msats: u64,
|
||||
@@ -156,7 +157,6 @@ pub fn fetch_invoice_lud16(
|
||||
}))
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn fetch_invoice_lnurl(
|
||||
lnurl: String,
|
||||
msats: u64,
|
||||
|
||||
Reference in New Issue
Block a user