diff --git a/lib/plugins/wallet/infura/infura.js b/lib/plugins/wallet/infura/infura.js index fe550612..8cff40b4 100644 --- a/lib/plugins/wallet/infura/infura.js +++ b/lib/plugins/wallet/infura/infura.js @@ -2,8 +2,10 @@ const _ = require('lodash/fp') const base = require('../geth/base') function run (account) { - const endpoint = account.endpoint - if (!endpoint) throw new Error('Need to configure API endpoint for Infura') + 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) }