mirror of
https://github.com/stakwork/sphinx-relay.git
synced 2026-08-13 12:33:24 +02:00
missed lint file
This commit is contained in:
parent
f44bbc6388
commit
efb6be5a07
4 changed files with 11 additions and 7 deletions
0
.husky/pre-commit
Normal file → Executable file
0
.husky/pre-commit
Normal file → Executable file
1
app.ts
1
app.ts
|
|
@ -14,7 +14,6 @@ import { ownerMiddleware, unlocker } from './src/auth'
|
|||
import * as grpc from './src/grpc/subscribe'
|
||||
import * as cert from './src/utils/cert'
|
||||
import { loadConfig } from './src/utils/config'
|
||||
// import * as lightning from './src/grpc/lightning'
|
||||
|
||||
const env = process.env.NODE_ENV || 'development'
|
||||
const config = loadConfig()
|
||||
|
|
|
|||
|
|
@ -105,5 +105,10 @@
|
|||
"dist/config/*"
|
||||
]
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "pretty-quick --staged"
|
||||
}
|
||||
},
|
||||
"bin": "dist/app.js"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ export const payInvoice = async (req, res) => {
|
|||
message.status = constants.statuses.confirmed
|
||||
message.save()
|
||||
|
||||
var date = new Date()
|
||||
const date = new Date()
|
||||
date.setMilliseconds(0)
|
||||
|
||||
const chat = await models.Chat.findOne({
|
||||
|
|
@ -88,7 +88,7 @@ export const payInvoice = async (req, res) => {
|
|||
async function anonymousInvoice(res, payment_request: string, tenant: number) {
|
||||
const { memo, sat, msat, paymentHash, invoiceDate } =
|
||||
decodePaymentRequest(payment_request)
|
||||
var date = new Date()
|
||||
const date = new Date()
|
||||
date.setMilliseconds(0)
|
||||
models.Message.create({
|
||||
chatId: 0,
|
||||
|
|
@ -122,7 +122,7 @@ export const createInvoice = async (req, res) => {
|
|||
|
||||
const { amount, memo, remote_memo, chat_id, contact_id, expiry } = req.body
|
||||
|
||||
var request: interfaces.AddInvoiceRequest = {
|
||||
const request: interfaces.AddInvoiceRequest = {
|
||||
value: amount,
|
||||
memo: remote_memo || memo,
|
||||
}
|
||||
|
|
@ -170,8 +170,8 @@ export const createInvoice = async (req, res) => {
|
|||
})
|
||||
if (!chat) return failure(res, 'counldnt findOrCreateChat')
|
||||
|
||||
let timestamp = parseInt(invoice.timestamp + '000')
|
||||
let expiry = parseInt(invoice.timeExpireDate + '000')
|
||||
const timestamp = parseInt(invoice.timestamp + '000')
|
||||
const expiry = parseInt(invoice.timeExpireDate + '000')
|
||||
|
||||
const message = await models.Message.create({
|
||||
chatId: chat.id,
|
||||
|
|
@ -233,7 +233,7 @@ export const receiveInvoice = async (payload) => {
|
|||
const dat = payload.content || payload
|
||||
const payment_request = dat.message.invoice
|
||||
const network_type = dat.network_type || 0
|
||||
var date = new Date()
|
||||
const date = new Date()
|
||||
date.setMilliseconds(0)
|
||||
|
||||
const {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue