mirror of
https://github.com/Xahau/Validation-Ledger-Tx-Store-to-xPOP.git
synced 2025-11-04 12:25:48 +00:00
Report networkid 0 as 0 instead of null
This commit is contained in:
@@ -20,7 +20,7 @@ const telemetry = {
|
|||||||
host: null,
|
host: null,
|
||||||
proto: null,
|
proto: null,
|
||||||
url: process.env?.URL_PREFIX,
|
url: process.env?.URL_PREFIX,
|
||||||
networkid: process.env?.NETWORKID ?? null,
|
networkid: process.env?.NETWORKID ?? 0,
|
||||||
collected: false,
|
collected: false,
|
||||||
sent: false,
|
sent: false,
|
||||||
}
|
}
|
||||||
@@ -129,7 +129,7 @@ if (!wss) {
|
|||||||
},
|
},
|
||||||
config: {
|
config: {
|
||||||
version,
|
version,
|
||||||
networkid: process.env?.NETWORKID ?? null,
|
networkid: process.env?.NETWORKID ?? 0,
|
||||||
urlprefix: process.env?.URL_PREFIX ?? null,
|
urlprefix: process.env?.URL_PREFIX ?? null,
|
||||||
requiredTxFields: typeof process.env?.FIELDSREQUIRED === 'string' ? process.env.FIELDSREQUIRED.split(',') : null,
|
requiredTxFields: typeof process.env?.FIELDSREQUIRED === 'string' ? process.env.FIELDSREQUIRED.split(',') : null,
|
||||||
},
|
},
|
||||||
@@ -152,7 +152,7 @@ if (!wss) {
|
|||||||
res.setHeader('content-type', 'application/json')
|
res.setHeader('content-type', 'application/json')
|
||||||
res.json({
|
res.json({
|
||||||
version,
|
version,
|
||||||
networkid: Number(process.env?.NETWORKID ?? 0) || null,
|
networkid: Number(process.env?.NETWORKID ?? 0),
|
||||||
uptime: new Date() - startDate,
|
uptime: new Date() - startDate,
|
||||||
lastLedger: lastLedger ?? null,
|
lastLedger: lastLedger ?? null,
|
||||||
lastWsPushedLedger: lastWsPushedLedger ?? null,
|
lastWsPushedLedger: lastWsPushedLedger ?? null,
|
||||||
|
|||||||
Reference in New Issue
Block a user