|
@@ -13,6 +13,7 @@ use std::sync::Arc;
|
|
|
|
|
|
use async_trait::async_trait;
|
|
|
use bitcoin::hashes::{sha256, Hash};
|
|
|
+use bitcoin::secp256k1::rand::{thread_rng, Rng};
|
|
|
use bitcoin::secp256k1::{Secp256k1, SecretKey};
|
|
|
use cdk::amount::{to_unit, Amount, MSAT_IN_SAT};
|
|
|
use cdk::cdk_lightning::{
|
|
@@ -26,7 +27,6 @@ use error::Error;
|
|
|
use futures::stream::StreamExt;
|
|
|
use futures::Stream;
|
|
|
use lightning_invoice::{Bolt11Invoice, Currency, InvoiceBuilder, PaymentSecret};
|
|
|
-use rand::Rng;
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
use tokio::sync::Mutex;
|
|
|
use tokio::time;
|
|
@@ -281,7 +281,7 @@ pub fn create_fake_invoice(amount_msat: u64, description: String) -> Bolt11Invoi
|
|
|
)
|
|
|
.unwrap();
|
|
|
|
|
|
- let mut rng = rand::thread_rng();
|
|
|
+ let mut rng = thread_rng();
|
|
|
let mut random_bytes = [0u8; 32];
|
|
|
rng.fill(&mut random_bytes);
|
|
|
|