From ec5a5c9b218dbb83525ee104b39ec617a3bec37c Mon Sep 17 00:00:00 2001 From: Polybius93 Date: Tue, 15 Oct 2024 19:04:15 +0200 Subject: [PATCH] feat: modify ripplehandler to have websockerurl argument in constructor --- src/network-handlers/ripple-handler.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/network-handlers/ripple-handler.ts b/src/network-handlers/ripple-handler.ts index 0cd49f1..6cc2aab 100644 --- a/src/network-handlers/ripple-handler.ts +++ b/src/network-handlers/ripple-handler.ts @@ -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 {