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

@ -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 })