Merge remote-tracking branch 'upstream/release-8.0' into feat/eip-1559-USDT

This commit is contained in:
Taranto 2022-06-27 21:54:39 +01:00
commit c9939622ba
8 changed files with 324 additions and 15 deletions

View file

@ -28,6 +28,13 @@ function updateCore (coinRec, isCurrentlyRunning) {
common.es(`rm -r /tmp/${coinRec.dir.replace('/bin', '')}`)
common.es(`rm /tmp/bitcoincash.tar.gz`)
if (common.es(`grep "listenonion=" /mnt/blockchains/bitcoincash/bitcoincash.conf || true`)) {
common.logger.info(`listenonion already defined, skipping...`)
} else {
common.logger.info(`Setting 'listenonion=0' in config file...`)
common.es(`echo "\nlistenonion=0" >> /mnt/blockchains/bitcoincash/bitcoincash.conf`)
}
if (isCurrentlyRunning) {
common.logger.info('Starting wallet...')
common.es(`sudo supervisorctl start bitcoincash`)
@ -47,5 +54,6 @@ prune=4000
daemon=0
bind=0.0.0.0:8335
rpcport=8336
listenonion=0
`
}

View file

@ -29,8 +29,8 @@ const BINARIES = {
dir: 'bitcoin-23.0/bin'
},
ETH: {
url: 'https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.10.17-25c9b49f.tar.gz',
dir: 'geth-linux-amd64-1.10.17-25c9b49f'
url: 'https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.10.19-23bee162.tar.gz',
dir: 'geth-linux-amd64-1.10.19-23bee162'
},
ZEC: {
url: 'https://z.cash/downloads/zcash-5.0.0-linux64-debian-bullseye.tar.gz',
@ -43,12 +43,12 @@ const BINARIES = {
LTC: {
defaultUrl: 'https://download.litecoin.org/litecoin-0.18.1/linux/litecoin-0.18.1-x86_64-linux-gnu.tar.gz',
defaultDir: 'litecoin-0.18.1/bin',
url: 'https://download.litecoin.org/litecoin-0.21.2/linux/litecoin-0.21.2-x86_64-linux-gnu.tar.gz',
dir: 'litecoin-0.21.2/bin'
url: 'https://download.litecoin.org/litecoin-0.21.2.1/linux/litecoin-0.21.2.1-x86_64-linux-gnu.tar.gz',
dir: 'litecoin-0.21.2.1/bin'
},
BCH: {
url: 'https://github.com/bitcoin-cash-node/bitcoin-cash-node/releases/download/v24.0.0/bitcoin-cash-node-24.0.0-x86_64-linux-gnu.tar.gz',
dir: 'bitcoin-cash-node-24.0.0/bin',
url: 'https://github.com/bitcoin-cash-node/bitcoin-cash-node/releases/download/v24.1.0/bitcoin-cash-node-24.1.0-x86_64-linux-gnu.tar.gz',
dir: 'bitcoin-cash-node-24.1.0/bin',
files: [['bitcoind', 'bitcoincashd'], ['bitcoin-cli', 'bitcoincash-cli']]
},
XMR: {

View file

@ -148,7 +148,9 @@ function run () {
name,
value: c.code,
checked,
disabled: checked && 'Installed'
disabled: c.cryptoCode === 'ETH'
? 'Use admin\'s Infura plugin'
: checked && 'Installed'
}
}),
])(cryptos)

View file

@ -13,7 +13,6 @@ const pify = require('pify')
const BN = require('../../../bn')
const ABI = require('../../tokens')
const NAME = 'geth'
exports.SUPPORTED_MODULES = ['wallet']
const paymentPrefixPath = "m/44'/60'/0'/0'"
@ -21,7 +20,6 @@ const defaultPrefixPath = "m/44'/60'/1'/0'"
let lastUsedNonces = {}
module.exports = {
NAME,
balance,
sendCoins,
newAddress,
@ -50,7 +48,7 @@ function isStrictAddress (cryptoCode, toAddress, settings, operatorId) {
return cryptoCode === 'ETH' && util.isValidChecksumAddress(toAddress)
}
function sendCoins (account, tx, settings, operatorId) {
function sendCoins (account, tx, settings, operatorId, feeMultiplier) {
const { toAddress, cryptoAtoms, cryptoCode } = tx
const isErc20Token = coins.utils.isErc20Token(cryptoCode)

View file

@ -1,9 +1,15 @@
const _ = require('lodash/fp')
const base = require('./base')
const { utils: coinUtils } = require('@lamassu/coins')
const cryptoRec = coinUtils.getCryptoCurrency('ETH')
const defaultPort = cryptoRec.defaultPort
base.connect(`http://localhost:${defaultPort}`)
const NAME = 'geth'
module.exports = base
function run (account) {
base.connect(`http://localhost:${defaultPort}`)
}
module.exports = _.merge(base, { NAME, run })

View file

@ -1,6 +1,8 @@
const _ = require('lodash/fp')
const base = require('../geth/base')
const NAME = 'infura'
function run (account) {
if (!account.endpoint) throw new Error('Need to configure API endpoint for Infura')
@ -10,4 +12,4 @@ function run (account) {
base.connect(endpoint)
}
module.exports = _.merge(base, {run})
module.exports = _.merge(base, { NAME, run })