Skip to content

Commit

Permalink
Merge pull request #13 from develoQ/export_endpoints
Browse files Browse the repository at this point in the history
Export default endpoints
  • Loading branch information
WietseWind authored Aug 8, 2023
2 parents e2f9e9f + afe4c22 commit d3a777f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ const feeDropsDefault = 12;
const feeDropsMax = 3600;
const tryAllNodes = false;

export const defaultEndpoints = [
"wss://xrplcluster.com",
"wss://xrpl.link",
"wss://s2.ripple.com",
]

export declare interface XrplClient {
on<U extends keyof XrplClientEvents>(
event: U,
Expand All @@ -59,11 +65,7 @@ const endpointParser = (endpoint?: string | string[]): string[] => {
}

if (endpoints.length < 1) {
endpoints = [
"wss://xrplcluster.com",
"wss://xrpl.link",
"wss://s2.ripple.com",
];
endpoints = defaultEndpoints;
logWarning(
"No valid WebSocket endpoint(s) specified, falling back to defaults",
endpoints
Expand Down

0 comments on commit d3a777f

Please sign in to comment.