Merge pull request #18 from cerc-io/dboreham/is-url-is-broken
Remove broken is-url dependency
This commit is contained in:
commit
fd26bd88dd
@ -7,7 +7,6 @@
|
|||||||
"author": "",
|
"author": "",
|
||||||
"license": "UNLICENSED",
|
"license": "UNLICENSED",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/is-url": "^1.2.30",
|
|
||||||
"@types/jest": "^27.4.1",
|
"@types/jest": "^27.4.1",
|
||||||
"@types/lodash": "^4.14.181",
|
"@types/lodash": "^4.14.181",
|
||||||
"@types/semver": "^7.3.9",
|
"@types/semver": "^7.3.9",
|
||||||
@ -38,7 +37,6 @@
|
|||||||
"ethers": "^5.6.2",
|
"ethers": "^5.6.2",
|
||||||
"evmosjs": "^0.2.5",
|
"evmosjs": "^0.2.5",
|
||||||
"graphql.js": "^0.6.8",
|
"graphql.js": "^0.6.8",
|
||||||
"is-url": "^1.2.4",
|
|
||||||
"js-sha256": "^0.9.0",
|
"js-sha256": "^0.9.0",
|
||||||
"js-yaml": "^3.14.1",
|
"js-yaml": "^3.14.1",
|
||||||
"jsonschema": "^1.4.0",
|
"jsonschema": "^1.4.0",
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import isUrl from 'is-url';
|
|
||||||
import { sha256 } from 'js-sha256';
|
import { sha256 } from 'js-sha256';
|
||||||
import { generatePostBodyBroadcast, BroadcastMode } from '@tharsis/provider';
|
import { generatePostBodyBroadcast, BroadcastMode } from '@tharsis/provider';
|
||||||
import {
|
import {
|
||||||
@ -122,13 +121,6 @@ export class Registry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
constructor(gqlUrl: string, restUrl: string = "", chainId: string = DEFAULT_CHAIN_ID) {
|
constructor(gqlUrl: string, restUrl: string = "", chainId: string = DEFAULT_CHAIN_ID) {
|
||||||
if (!isUrl(gqlUrl)) {
|
|
||||||
throw new Error('Path to a GQL endpoint should be provided.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (restUrl && !isUrl(restUrl)) {
|
|
||||||
throw new Error('REST endpoint is not a URL string.');
|
|
||||||
}
|
|
||||||
|
|
||||||
this._endpoints = {
|
this._endpoints = {
|
||||||
rest: restUrl,
|
rest: restUrl,
|
||||||
|
Loading…
Reference in New Issue
Block a user