Skip to content

Commit

Permalink
fix eslint command glob pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
antonilol committed Oct 9, 2022
1 parent 356d2ee commit 99f750e
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 25 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ src/utils/config.ts
!src/utils/msg.ts
!src/grpc

*.js

2 changes: 1 addition & 1 deletion dist/src/controllers/botapi/pay.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/src/controllers/botapi/pay.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions dist/src/utils/decode/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/src/utils/decode/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"dev": "rm -rf dist/ && tsc && cp -r public dist/public && node --inspect ./dist/app.js",
"build-binaries": "rm -rf dist/ && tsc && cp config/app.json dist/config/app.json && cp config/config.json dist/config/config.json && pkg . --target node12-alpine-x64,node12-macos-x64 --out-path binaries",
"start-ecs": "cp config/app.json dist/config/app.json && cp config/config.json dist/config/config.json && export NODE_ENV=production && node --max-old-space-size=128 dist/app.js",
"lint": "eslint ./src/*.ts ./src/**/*.ts --fix --max-warnings 466"
"lint": "eslint src --fix --max-warnings 479"
},
"keywords": [],
"author": "",
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/botapi/pay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default async function pay(a: Action): Promise<void> {
if (!a.recipient_id) return sphinxLogger.error(`no recipient_id`)
const ret = await validateAction(a)
if (!ret) return
let { chat, owner } = ret
const { chat, owner } = ret
const tenant: number = owner.id
const alias = bot_name || owner.alias
const botContactId = -1
Expand Down
20 changes: 10 additions & 10 deletions src/utils/decode/index.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import * as decodeUtils from './decode'

export function decodePaymentRequest(paymentRequest) {
var decodedPaymentRequest: any = decodeUtils.decode(paymentRequest)
var expirationSeconds = 3600
var paymentHash = ''
var memo = ''
const decodedPaymentRequest: any = decodeUtils.decode(paymentRequest)
let expirationSeconds = 3600
let paymentHash = ''
let memo = ''

for (var i = 0; i < decodedPaymentRequest.data.tags.length; i++) {
let tag = decodedPaymentRequest.data.tags[i]
for (let i = 0; i < decodedPaymentRequest.data.tags.length; i++) {
const tag = decodedPaymentRequest.data.tags[i]
if (tag) {
if (tag.description == 'payment_hash') {
paymentHash = tag.value
Expand All @@ -20,13 +20,13 @@ export function decodePaymentRequest(paymentRequest) {
}

expirationSeconds = parseInt(expirationSeconds.toString() + '000')
let invoiceDate = parseInt(
const invoiceDate = parseInt(
decodedPaymentRequest.data.time_stamp.toString() + '000'
)

let amount = decodedPaymentRequest['human_readable_part']['amount']
var msat = 0
var sat = 0
const amount = decodedPaymentRequest['human_readable_part']['amount']
let msat = 0
let sat = 0
if (Number.isInteger(amount)) {
msat = amount
sat = amount / 1000
Expand Down

0 comments on commit 99f750e

Please sign in to comment.