lamassu-server/lib/plugins/wallet/infura/infura.js
2019-07-16 10:29:20 +01:00

13 lines
365 B
JavaScript

const _ = require('lodash/fp')
const base = require('../geth/base')
function run (account) {
if (!account.endpoint) throw new Error('Need to configure API endpoint for Infura')
const endpoint = _.startsWith('https://')(account.endpoint)
? account.endpoint : `https://${account.endpoint}`
base.connect(endpoint)
}
module.exports = _.merge(base, {run})