log user idenifier and debit manager gets lnd and application manager
This commit is contained in:
parent
c40445ae14
commit
bed397e424
3 changed files with 6 additions and 2 deletions
|
|
@ -50,6 +50,8 @@ export default class {
|
||||||
const user = await this.storage.userStorage.GetUser(ctx.user_id)
|
const user = await this.storage.userStorage.GetUser(ctx.user_id)
|
||||||
const app = await this.storage.applicationStorage.GetApplication(ctx.app_id)
|
const app = await this.storage.applicationStorage.GetApplication(ctx.app_id)
|
||||||
const appUser = await this.storage.applicationStorage.GetAppUserFromUser(app, user.user_id)
|
const appUser = await this.storage.applicationStorage.GetAppUserFromUser(app, user.user_id)
|
||||||
|
console.log("User Identifier/pointer here", appUser?.identifier)
|
||||||
|
|
||||||
if (!appUser) {
|
if (!appUser) {
|
||||||
throw new Error(`app user ${ctx.user_id} not found`) // TODO: fix logs doxing
|
throw new Error(`app user ${ctx.user_id} not found`) // TODO: fix logs doxing
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,8 +42,10 @@ export class DebitManager {
|
||||||
storage: Storage
|
storage: Storage
|
||||||
lnd: LND
|
lnd: LND
|
||||||
logger = getLogger({ component: 'DebitManager' })
|
logger = getLogger({ component: 'DebitManager' })
|
||||||
constructor(storage: Storage) {
|
constructor(storage: Storage, lnd: LND, applicationManager: ApplicationManager) {
|
||||||
this.storage = storage
|
this.storage = storage
|
||||||
|
this.lnd = lnd
|
||||||
|
this.applicationManager = applicationManager
|
||||||
}
|
}
|
||||||
|
|
||||||
AuthorizeDebit = async (ctx: Types.UserContext, req: Types.DebitAuthorizationRequest): Promise<Types.DebitAuthorization> => {
|
AuthorizeDebit = async (ctx: Types.UserContext, req: Types.DebitAuthorizationRequest): Promise<Types.DebitAuthorization> => {
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ export default class {
|
||||||
this.productManager = new ProductManager(this.storage, this.paymentManager, this.settings)
|
this.productManager = new ProductManager(this.storage, this.paymentManager, this.settings)
|
||||||
this.applicationManager = new ApplicationManager(this.storage, this.settings, this.paymentManager)
|
this.applicationManager = new ApplicationManager(this.storage, this.settings, this.paymentManager)
|
||||||
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.debitManager = new DebitManager(this.storage, this.lnd, this.applicationManager)
|
||||||
}
|
}
|
||||||
|
|
||||||
Stop() {
|
Stop() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue