Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pg-collector' into pg-collector
Browse files Browse the repository at this point in the history
  • Loading branch information
yaseen-oakrev committed Sep 6, 2024
2 parents 434cdc2 + 36ccd2d commit 73d3dd4
Show file tree
Hide file tree
Showing 4 changed files with 188 additions and 31 deletions.
16 changes: 16 additions & 0 deletions package-lock.json

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

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"node-cron": "3.0.2",
"nodemon": "^2.0.20",
"pg": "8.12.0",
"pg-format": "^1.0.4",
"point-of-view": "4.6.0",
"qs": "6.11.0",
"socket.io": "4.7.1",
Expand All @@ -77,6 +78,7 @@
"@typescript-eslint/eslint-plugin": "5.60.1",
"@typescript-eslint/parser": "5.60.1",
"@typescript-eslint/typescript-estree": "5.61.0",
"@types/pg-format": "^1.0.5",
"eslint": "8.44.0",
"eslint-config-prettier": "8.8.0",
"eslint-config-standard": "17.1.0",
Expand Down
6 changes: 5 additions & 1 deletion src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ import { registerCache } from './cache/LatestBlockCache'
import { Utils as StringUtils } from '@shardus/types'
import { healthCheckRouter } from './routes/healthCheck'

import pgFormat from "pg-format"


if (config.env == envEnum.DEV) {
//default debug mode keys
// pragma: allowlist nextline secret
Expand Down Expand Up @@ -1403,7 +1406,8 @@ const start = async (): Promise<void> => {
filter.address = StringUtils.safeJsonParse(q.address)
}
if (typeof q.address === 'string') {
filter.address = [q.address]
const address = pgFormat('%s', q.address)
filter.address = [address]
}

if (isValidJson(q.topics) && Array.isArray(StringUtils.safeJsonParse(q.topics))) {
Expand Down
Loading

0 comments on commit 73d3dd4

Please sign in to comment.