From 3f7c1e9178cbfd1686f24aa763afaaf40fff21d1 Mon Sep 17 00:00:00 2001 From: Pedro Gomes Date: Wed, 9 Sep 2020 15:32:36 +0200 Subject: [PATCH] update and expose default options util --- modules/client/src/default.ts | 4 ++-- modules/client/src/index.ts | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/client/src/default.ts b/modules/client/src/default.ts index 01127760c4..255e88d5a6 100644 --- a/modules/client/src/default.ts +++ b/modules/client/src/default.ts @@ -21,7 +21,7 @@ const getGeneratedSigner = (): string => { return signer; }; -const getUrlOptions = (network: string): { ethProviderUrl: string; nodeUrl: string } => { +export const getUrlOptions = (network: string): { ethProviderUrl: string; nodeUrl: string } => { let urlOptions; if (network.toLowerCase() === "localhost") { @@ -31,7 +31,7 @@ const getUrlOptions = (network: string): { ethProviderUrl: string; nodeUrl: stri network.toLowerCase() === "mainnet" ? "indra.connext.network" : network.toLowerCase() === "rinkeby" - ? "rinkeby.indra.connext.network" + ? "staging.indra.connext.network" : null; if (!baseUrl) { throw new Error(`Provided network (${network.toLowerCase()}) is not supported`); diff --git a/modules/client/src/index.ts b/modules/client/src/index.ts index f6ecc647c3..11da9ae535 100644 --- a/modules/client/src/index.ts +++ b/modules/client/src/index.ts @@ -4,5 +4,6 @@ import * as utils from "@connext/utils"; import { connect } from "./connect"; import { ConnextClient } from "./connext"; +import { getUrlOptions, getDefaultOptions } from "./default"; -export { ConnextClient, connect, utils }; +export { ConnextClient, connect, utils, getUrlOptions, getDefaultOptions };