Merge pull request #754 from snake-eaterr/debits-fixies
log user idenifier and debit manager gets lnd and application manager
This commit is contained in:
commit
2229b3dfdf
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 app = await this.storage.applicationStorage.GetApplication(ctx.app_id)
|
||||
const appUser = await this.storage.applicationStorage.GetAppUserFromUser(app, user.user_id)
|
||||
console.log("User Identifier/pointer here", appUser?.identifier)
|
||||
|
||||
if (!appUser) {
|
||||
throw new Error(`app user ${ctx.user_id} not found`) // TODO: fix logs doxing
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,8 +42,10 @@ export class DebitManager {
|
|||
storage: Storage
|
||||
lnd: LND
|
||||
logger = getLogger({ component: 'DebitManager' })
|
||||
constructor(storage: Storage) {
|
||||
constructor(storage: Storage, lnd: LND, applicationManager: ApplicationManager) {
|
||||
this.storage = storage
|
||||
this.lnd = lnd
|
||||
this.applicationManager = applicationManager
|
||||
}
|
||||
|
||||
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.applicationManager = new ApplicationManager(this.storage, this.settings, this.paymentManager)
|
||||
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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue