Merge remote-tracking branch 'upstream/release-8.0' into release-8.1
This commit is contained in:
commit
9a22d7e976
7 changed files with 324 additions and 13 deletions
|
|
@ -12,7 +12,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'"
|
||||
|
|
@ -20,7 +19,6 @@ const defaultPrefixPath = "m/44'/60'/1'/0'"
|
|||
let lastUsedNonces = {}
|
||||
|
||||
module.exports = {
|
||||
NAME,
|
||||
balance,
|
||||
sendCoins,
|
||||
newAddress,
|
||||
|
|
@ -49,7 +47,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
|
||||
return generateTx(toAddress, defaultWallet(account), cryptoAtoms, false, cryptoCode)
|
||||
.then(pify(web3.eth.sendSignedTransaction))
|
||||
|
|
|
|||
|
|
@ -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 })
|
||||
|
|
|
|||
|
|
@ -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 })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue