Merge pull request #1801 from lamassu/releases/v10.2

Releases/v10.2
This commit is contained in:
Rafael Taranto 2025-03-11 13:34:13 +00:00 committed by GitHub
commit 568cd3eb3c
3 changed files with 5 additions and 6 deletions

View file

@ -21,7 +21,7 @@ function createCashboxBatch (deviceId, cashboxCount) {
return db.tx(t => {
const batchId = uuid.v4()
const q1 = t.none(sql, [batchId, deviceId])
const q1 = t.one(sql, [batchId, deviceId])
const q2 = t.none(sql2, [batchId, deviceId])
const q3 = t.none(sql3, [batchId, deviceId])
return t.batch([q1, q2, q3])

View file

@ -161,7 +161,7 @@ function generateErc20Tx (_toAddress, wallet, amount, includesFee, cryptoCode) {
.then(([gas, txCount, baseFeePerGas]) => {
lastUsedNonces[fromAddress] = txCount
const maxPriorityFeePerGas = new BN(web3.utils.toWei('2.5', 'gwei')) // web3 default value
const maxPriorityFeePerGas = new BN(web3.utils.toWei('1.0', 'gwei')) // web3 default value
const maxFeePerGas = new BN(2).times(baseFeePerGas).plus(maxPriorityFeePerGas)
if (includesFee && (toSend.isNegative() || toSend.isZero())) {
@ -219,9 +219,8 @@ function generateTx (_toAddress, wallet, amount, includesFee, cryptoCode, txId)
.then(([gas, gasPrice, txCount, baseFeePerGas]) => {
lastUsedNonces[fromAddress] = txCount
const maxPriorityFeePerGas = new BN(web3.utils.toWei('2.5', 'gwei')) // web3 default value
const neededPriority = new BN(web3.utils.toWei('2.0', 'gwei'))
const maxFeePerGas = baseFeePerGas.plus(neededPriority)
const maxPriorityFeePerGas = new BN(web3.utils.toWei('1.0', 'gwei')) // web3 default value
const maxFeePerGas = baseFeePerGas.times(2).plus(maxPriorityFeePerGas)
const newGasPrice = BN.minimum(maxFeePerGas, baseFeePerGas.plus(maxPriorityFeePerGas))
const toSend = includesFee

View file

@ -19,7 +19,7 @@ const loadOrUpdateSanctions = () => {
sanctionStatus.timestamp = Date.now()
})
.catch(e => {
logger.error('Couldn\'t load OFAC sanction list!')
logger.error('Couldn\'t load OFAC sanction list!', e)
})
}