Assume https:// at the start of infura endpoint
This commit is contained in:
parent
2f451c5893
commit
c5398c4b86
1 changed files with 4 additions and 2 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue