Skip to content

Commit

Permalink
feat: import instead of require networks.json
Browse files Browse the repository at this point in the history
  • Loading branch information
mi-xu authored and mirceanis committed Oct 2, 2019
1 parent 3d62126 commit 50c0832
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ethr-did-resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import BN from 'bn.js'
import EthContract from 'ethjs-contract'
import DidRegistryContract from '../contracts/ethr-did-registry.json'
import { Buffer } from 'buffer'
import networksJson from './networks.json'
const REGISTRY = '0xdca7ef03e98e0dc2b855be647c39abe984fcf21b'

function bytes32toString (bytes32) {
Expand Down Expand Up @@ -199,7 +200,7 @@ function getResolver (conf = {}) {

const networks = {
mainnet: configureNetwork(conf),
...configureNetworks(require('./networks.json')),
...configureNetworks(networksJson),
...configureNetworks(conf.networks)
}

Expand Down

0 comments on commit 50c0832

Please sign in to comment.