fixed?
This commit is contained in:
parent
2879517c92
commit
a6aef23df1
2 changed files with 1 additions and 4 deletions
|
|
@ -114,12 +114,11 @@ export default class {
|
|||
NewBlockHandler = async (height: number) => {
|
||||
let confirmed: (PendingTx & { confs: number; })[]
|
||||
let log = getLogger({})
|
||||
log("checking new block", height)
|
||||
|
||||
try {
|
||||
const balanceEvents = await this.paymentManager.GetLndBalance()
|
||||
await this.metricsManager.NewBlockCb(height, balanceEvents)
|
||||
confirmed = await this.paymentManager.CheckNewlyConfirmedTxs(height)
|
||||
log("checked newly confirmed transactions", confirmed)
|
||||
await this.liquidityManager.onNewBlock()
|
||||
} catch (err: any) {
|
||||
log(ERROR, "failed to check transactions after new block", err.message || err)
|
||||
|
|
|
|||
|
|
@ -211,11 +211,9 @@ export default class {
|
|||
}
|
||||
const existingAddress = await this.storage.paymentStorage.GetExistingUserAddress(ctx.user_id, app)
|
||||
if (existingAddress) {
|
||||
this.log("returning existing address", existingAddress.address)
|
||||
return { address: existingAddress.address }
|
||||
}
|
||||
const res = await this.lnd.NewAddress(req.addressType, { useProvider: false, from: 'user' })
|
||||
this.log("generated new address", res.address)
|
||||
const userAddress = await this.storage.paymentStorage.AddUserAddress(user, res.address, { linkedApplication: app })
|
||||
this.storage.eventsLog.LogEvent({ type: 'new_address', userId: user.user_id, appUserId: "", appId: app.app_id, balance: user.balance_sats, data: res.address, amount: 0 })
|
||||
return { address: userAddress.address }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue