Skip to content

Commit cb0a8ac

Browse files
committed
fix clippy
1 parent 052311a commit cb0a8ac

4 files changed

Lines changed: 5 additions & 8 deletions

File tree

orange-sdk/src/event.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use crate::logging::Logger;
2-
use crate::store::{self, PaymentId, TxMetadataStore};
2+
use crate::store::{self, PaymentId};
33

44
use ldk_node::bitcoin::secp256k1::PublicKey;
55
use ldk_node::bitcoin::{OutPoint, Txid};
@@ -308,7 +308,6 @@ impl Future for EventFuture {
308308
#[derive(Clone)]
309309
pub(crate) struct LdkEventHandler {
310310
pub(crate) event_queue: Arc<EventQueue>,
311-
pub(crate) tx_metadata: TxMetadataStore,
312311
pub(crate) ldk_node: Arc<ldk_node::Node>,
313312
pub(crate) payment_receipt_sender: watch::Sender<()>,
314313
pub(crate) channel_pending_sender: watch::Sender<u128>,

orange-sdk/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,6 @@ impl Wallet {
564564
config,
565565
Arc::clone(&store),
566566
Arc::clone(&event_queue),
567-
tx_metadata.clone(),
568567
Arc::clone(&logger),
569568
)
570569
.await?,

orange-sdk/src/lightning_wallet.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::bitcoin::OutPoint;
22
use crate::event::{EventQueue, LdkEventHandler};
33
use crate::logging::Logger;
4-
use crate::store::{TxMetadataStore, TxStatus};
4+
use crate::store::TxStatus;
55
use crate::{ChainSource, InitFailure, PaymentType, Seed, WalletConfig};
66

77
use bitcoin_payment_instructions::PaymentMethod;
@@ -53,7 +53,7 @@ const DEFAULT_INVOICE_EXPIRY_SECS: u32 = 86_400; // 24 hours
5353
impl LightningWallet {
5454
pub(super) async fn init(
5555
runtime: Arc<Runtime>, config: WalletConfig, store: Arc<dyn KVStore + Sync + Send>,
56-
event_queue: Arc<EventQueue>, tx_metadata: TxMetadataStore, logger: Arc<Logger>,
56+
event_queue: Arc<EventQueue>, logger: Arc<Logger>,
5757
) -> Result<Self, InitFailure> {
5858
log_info!(logger, "Creating LDK node...");
5959
let anchor_channels_config = ldk_node::config::AnchorChannelsConfig {
@@ -164,7 +164,6 @@ impl LightningWallet {
164164
ldk_node: Arc::clone(&ldk_node),
165165
payment_receipt_sender,
166166
channel_pending_sender,
167-
tx_metadata,
168167
logger,
169168
});
170169
let inner = Arc::new(LightningWalletImpl {

orange-sdk/src/trusted_wallet/dummy.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,8 @@ impl TrustedWalletInterface for DummyTrustedWallet {
364364
// bad assumptions properly. So we mangle the payment id a bit here to avoid collisions.
365365
fn mangle_payment_id(id: [u8; 32]) -> [u8; 32] {
366366
let mut mangled = id;
367-
for i in 0..32 {
368-
mangled[i] = mangled[i].wrapping_add(0x42);
367+
for i in &mut mangled {
368+
*i = i.wrapping_add(0x42);
369369
}
370370
mangled
371371
}

0 commit comments

Comments
 (0)