Merge branch 'dev' into feat/lam-1291/stress-testing
* dev: (39 commits) chore: re-add build files fix: mailgun as default fix: backwards compatibility on cashout fixed fee chore: remove coinbase as a ticker fix: expire temporary cookies on browser close fix: optimize and normalize bills and blacklist chore: data for cypress chore: deprecate old unused tables chore: remove dependency on async local storage fix: proper datetime name chore: remove extra comment chore: update build chore: migrating to nodejs 22 feat: show unpaired device names on transactions chore: deprecate old migrations fix: update yup usage on custom info requests fix: loading svg on usdc chore: lamassu coins version bump chore: lamassu coins bump on admin fix: fee for sweeps ...
This commit is contained in:
commit
5d24f9b889
124 changed files with 17979 additions and 15339 deletions
|
|
@ -1,8 +1,5 @@
|
|||
const _ = require('lodash/fp')
|
||||
const crypto = require('crypto')
|
||||
|
||||
const logger = require('../logger')
|
||||
|
||||
const IS_STRESS_TESTING = process.env.LAMASSU_STRESS_TESTING === "YES"
|
||||
|
||||
function sha256 (buf) {
|
||||
|
|
@ -14,9 +11,8 @@ function sha256 (buf) {
|
|||
}
|
||||
|
||||
const populateDeviceId = function (req, res, next) {
|
||||
let deviceId = _.isFunction(req.connection.getPeerCertificate)
|
||||
? sha256(req.connection.getPeerCertificate()?.raw)
|
||||
: null
|
||||
const peerCert = req.socket.getPeerCertificate ? req.socket.getPeerCertificate() : null
|
||||
let deviceId = peerCert?.raw ? sha256(peerCert.raw) : null
|
||||
|
||||
if (!deviceId && IS_STRESS_TESTING)
|
||||
deviceId = req.headers.device_id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue