nostr handler

This commit is contained in:
shocknet-justin 2025-06-15 14:05:03 -04:00
parent 1950bebd74
commit acb09396ec
2 changed files with 5 additions and 3 deletions

View file

@ -40,8 +40,11 @@ export default (serverMethods: Types.ServerMethods, mainHandler: Main, nostrSett
}) })
let nostr: Nostr; let nostr: Nostr;
const managementManager = new ManagementManager((...args: Parameters<NostrSend>) => nostr.Send(...args), mainHandler.storage); if (!mainHandler.managementManager) {
mainHandler.managementManager = managementManager; throw new Error("management manager not initialized on main handler")
}
const managementManager = mainHandler.managementManager;
nostr = new Nostr(nostrSettings, mainHandler.utils, event => { nostr = new Nostr(nostrSettings, mainHandler.utils, event => {
let j: NostrRequest let j: NostrRequest

View file

@ -79,7 +79,6 @@ export default class {
this.appUserManager = new AppUserManager(this.storage, this.settings, this.applicationManager) this.appUserManager = new AppUserManager(this.storage, this.settings, this.applicationManager)
this.debitManager = new DebitManager(this.storage, this.lnd, this.applicationManager) this.debitManager = new DebitManager(this.storage, this.lnd, this.applicationManager)
this.offerManager = new OfferManager(this.storage, this.lnd, this.applicationManager, this.productManager, this.liquidityManager) this.offerManager = new OfferManager(this.storage, this.lnd, this.applicationManager, this.productManager, this.liquidityManager)
const nostrSettings = LoadNosrtSettingsFromEnv()
this.managementManager = new ManagementManager(this.nostrSend, this.storage) this.managementManager = new ManagementManager(this.nostrSend, this.storage)
//this.webRTC = new webRTC(this.storage, this.utils) //this.webRTC = new webRTC(this.storage, this.utils)
} }