up
This commit is contained in:
parent
6fea71be40
commit
aa6923be3e
2 changed files with 2 additions and 4 deletions
|
|
@ -179,9 +179,7 @@ export default class {
|
||||||
const receiver = await this.storage.applicationStorage.GetApplicationUser(app, req.receiver_identifier)
|
const receiver = await this.storage.applicationStorage.GetApplicationUser(app, req.receiver_identifier)
|
||||||
const { user: payer } = await this.storage.applicationStorage.GetOrCreateApplicationUser(app, req.payer_identifier, 0)
|
const { user: payer } = await this.storage.applicationStorage.GetOrCreateApplicationUser(app, req.payer_identifier, 0)
|
||||||
const opts: InboundOptionals = { callbackUrl: req.http_callback_url, expiry: defaultInvoiceExpiry, expectedPayer: payer.user, linkedApplication: app }
|
const opts: InboundOptionals = { callbackUrl: req.http_callback_url, expiry: defaultInvoiceExpiry, expectedPayer: payer.user, linkedApplication: app }
|
||||||
log("generating invoice...")
|
|
||||||
const appUserInvoice = await this.paymentManager.NewInvoice(receiver.user.user_id, req.invoice_req, opts)
|
const appUserInvoice = await this.paymentManager.NewInvoice(receiver.user.user_id, req.invoice_req, opts)
|
||||||
log(receiver.identifier, "invoice created to be paid by", payer.identifier)
|
|
||||||
return {
|
return {
|
||||||
invoice: appUserInvoice.invoice
|
invoice: appUserInvoice.invoice
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -72,11 +72,11 @@ export class StateBundler {
|
||||||
const { used, from, timeDiscount } = settings
|
const { used, from, timeDiscount } = settings
|
||||||
const meta = settings.meta || []
|
const meta = settings.meta || []
|
||||||
const key = [actionName, from, used, ...meta].join('_')
|
const key = [actionName, from, used, ...meta].join('_')
|
||||||
this.increment(key, v)
|
|
||||||
if (timeDiscount) {
|
if (timeDiscount) {
|
||||||
this.totalSatsForDiscount += v
|
this.totalSatsForDiscount += v
|
||||||
}
|
}
|
||||||
this.smallLogEvent(actionName, from)
|
this.increment(key, v)
|
||||||
|
//this.smallLogEvent(actionName, from)
|
||||||
}
|
}
|
||||||
|
|
||||||
AddTxPointFailed = (actionName: TransactionStatePointType, v: number, settings: TxPointSettings) => {
|
AddTxPointFailed = (actionName: TransactionStatePointType, v: number, settings: TxPointSettings) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue