@@ -21,6 +21,7 @@ import (
2121 "github.com/lightninglabs/loop/loopd/perms"
2222 "github.com/lightninglabs/loop/loopdb"
2323 loop_looprpc "github.com/lightninglabs/loop/looprpc"
24+ "github.com/lightninglabs/loop/notifications"
2425 loop_swaprpc "github.com/lightninglabs/loop/swapserverrpc"
2526 "github.com/lightninglabs/loop/sweepbatcher"
2627 "github.com/lightningnetwork/lnd/clock"
@@ -498,21 +499,35 @@ func (d *Daemon) initialize(withMacaroonService bool) error {
498499 }
499500 }
500501
502+ // Start the notification manager.
503+ notificationCfg := & notifications.Config {
504+ Client : loop_swaprpc .NewSwapServerClient (swapClient .Conn ),
505+ FetchL402 : d .impl .Server .FetchL402 ,
506+ }
507+ notificationManager := notifications .NewManager (notificationCfg )
508+
509+ err = notificationManager .Run (d .mainCtx )
510+ if err != nil {
511+ return err
512+ }
513+
501514 var (
502515 reservationManager * reservation.Manager
503516 instantOutManager * instantout.Manager
504517 )
518+
505519 // Create the reservation and instantout managers.
506520 if d .cfg .EnableExperimental {
507521 reservationStore := reservation .NewSQLStore (
508522 loopdb.NewTypedStore [reservation.Querier ](baseDb ),
509523 )
510524 reservationConfig := & reservation.Config {
511- Store : reservationStore ,
512- Wallet : d .lnd .WalletKit ,
513- ChainNotifier : d .lnd .ChainNotifier ,
514- ReservationClient : reservationClient ,
515- FetchL402 : swapClient .Server .FetchL402 ,
525+ Store : reservationStore ,
526+ Wallet : d .lnd .WalletKit ,
527+ ChainNotifier : d .lnd .ChainNotifier ,
528+ ReservationClient : reservationClient ,
529+ FetchL402 : swapClient .Server .FetchL402 ,
530+ NotificationManager : notificationManager ,
516531 }
517532
518533 reservationManager = reservation .NewManager (
0 commit comments