Skip to content
This repository has been archived by the owner on May 28, 2021. It is now read-only.

update and expose default options util #1421

Open
wants to merge 2 commits into
base: staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions modules/client/src/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand All @@ -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`);
Expand Down
3 changes: 2 additions & 1 deletion modules/client/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 };