@@ -36,11 +36,10 @@ use ldk_node::bitcoin::secp256k1::PublicKey;
3636use ldk_node:: io:: sqlite_store:: SqliteStore ;
3737use ldk_node:: lightning:: ln:: msgs:: SocketAddress ;
3838use ldk_node:: lightning:: util:: logger:: Logger as _;
39- use ldk_node:: lightning:: util:: persist:: KVStore ;
4039use ldk_node:: lightning:: { log_debug, log_error, log_info, log_trace, log_warn} ;
4140use ldk_node:: lightning_invoice:: Bolt11Invoice ;
4241use ldk_node:: payment:: PaymentKind ;
43- use ldk_node:: { BuildError , ChannelDetails , NodeError } ;
42+ use ldk_node:: { BuildError , ChannelDetails , DynStore , NodeError } ;
4443
4544use tokio:: runtime:: Runtime ;
4645
@@ -125,7 +124,7 @@ struct WalletImpl {
125124 /// Metadata store for tracking transactions.
126125 tx_metadata : TxMetadataStore ,
127126 /// Key-value store for persistent storage.
128- store : Arc < dyn KVStore + Send + Sync > ,
127+ store : Arc < DynStore > ,
129128 /// Logger for logging wallet operations.
130129 logger : Arc < Logger > ,
131130 /// The Tokio runtime for asynchronous operations.
@@ -532,15 +531,15 @@ impl Wallet {
532531
533532 log_info ! ( logger, "Initializing orange on network: {network}" ) ;
534533
535- let store: Arc < dyn KVStore + Send + Sync > = match & config. storage_config {
534+ let store: Arc < DynStore > = match & config. storage_config {
536535 StorageConfig :: LocalSQLite ( path) => {
537536 Arc :: new ( SqliteStore :: new ( path. into ( ) , Some ( "orange.sqlite" . to_owned ( ) ) , None ) ?)
538537 } ,
539538 } ;
540539
541540 let event_queue = Arc :: new ( EventQueue :: new ( Arc :: clone ( & store) , Arc :: clone ( & logger) ) ) ;
542541
543- let tx_metadata = TxMetadataStore :: new ( Arc :: clone ( & store) ) ;
542+ let tx_metadata = TxMetadataStore :: new ( Arc :: clone ( & store) ) . await ;
544543
545544 let trusted: Arc < Box < DynTrustedWalletInterface > > = match & config. extra_config {
546545 #[ cfg( feature = "spark" ) ]
@@ -650,7 +649,7 @@ impl Wallet {
650649
651650 /// Sets whether the wallet should automatically rebalance from trusted/onchain to lightning.
652651 pub fn set_rebalance_enabled ( & self , value : bool ) {
653- store:: set_rebalance_enabled ( self . inner . store . as_ref ( ) , value) ;
652+ store:: set_rebalance_enabled ( self . inner . store . as_ref ( ) , value)
654653 }
655654
656655 /// Whether the wallet should automatically rebalance from trusted/onchain to lightning.
@@ -1027,7 +1026,8 @@ impl Wallet {
10271026 pub async fn parse_payment_instructions (
10281027 & self , instructions : & str ,
10291028 ) -> Result < PaymentInstructions , instructions:: ParseError > {
1030- PaymentInstructions :: parse ( instructions, self . inner . network , & HTTPHrnResolver , true ) . await
1029+ PaymentInstructions :: parse ( instructions, self . inner . network , & HTTPHrnResolver :: new ( ) , true )
1030+ . await
10311031 }
10321032
10331033 /*/// Verifies instructions which allow us to claim funds given as:
@@ -1156,7 +1156,8 @@ impl Wallet {
11561156
11571157 let methods = match & instructions. instructions {
11581158 PaymentInstructions :: ConfigurableAmount ( conf) => {
1159- let res = conf. clone ( ) . set_amount ( instructions. amount , & HTTPHrnResolver ) . await ;
1159+ let res =
1160+ conf. clone ( ) . set_amount ( instructions. amount , & HTTPHrnResolver :: new ( ) ) . await ;
11601161 let fixed_instr = res. map_err ( |e| {
11611162 log_error ! (
11621163 self . inner. logger,
@@ -1270,8 +1271,8 @@ impl Wallet {
12701271 /// Authenticates the user via [LNURL-auth] for the given LNURL string.
12711272 ///
12721273 /// [LNURL-auth]: https://github.com/lnurl/luds/blob/luds/04.md
1273- pub fn lnurl_auth ( & self , lnurl : & str ) -> Result < ( ) , WalletError > {
1274- self . inner . ln_wallet . inner . ldk_node . lnurl_auth ( lnurl) ?;
1274+ pub fn lnurl_auth ( & self , _lnurl : & str ) -> Result < ( ) , WalletError > {
1275+ // todo wait for merge, self.inner.ln_wallet.inner.ldk_node.lnurl_auth(lnurl)?;
12751276 Ok ( ( ) )
12761277 }
12771278
0 commit comments