Skip to content

Commit

Permalink
feat: modify ripplehandler to have websockerurl argument in constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Polybius93 committed Oct 15, 2024
1 parent f73dc87 commit ec5a5c9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/network-handlers/ripple-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ export class RippleHandler {
private wallet: xrpl.Wallet;
private issuerAddress: string;

private constructor(seedPhrase: string, issuerAddress: string) {
this.client = new xrpl.Client('wss://s.altnet.rippletest.net:51233');
private constructor(seedPhrase: string, issuerAddress: string, websocketURL: string) {
this.client = new xrpl.Client(websocketURL);
this.wallet = xrpl.Wallet.fromSeed(seedPhrase);
this.issuerAddress = issuerAddress;
}

static fromSeed(seedPhrase: string, issuerAddress: string): RippleHandler {
return new RippleHandler(seedPhrase, issuerAddress);
static fromSeed(seedPhrase: string, issuerAddress: string, websocketURL: string): RippleHandler {
return new RippleHandler(seedPhrase, issuerAddress, websocketURL);
}

async submit(signatures: string[]): Promise<string> {
Expand Down

0 comments on commit ec5a5c9

Please sign in to comment.