Closed shortthefomo closed 2 years ago
Thanks :)
I assume you want to manually switch a node if e.g. the node you're connected to doesn't satisfy
I'm afraid that sending the event won't do anything here, as the lib doesn't rely on the event to perform the actual switch: it just sends the event to inform the client. To do the actual switching, there's a routine in the connect
method:
https://github.com/XRPL-Labs/xrpl-client/blob/main/src/index.ts#L659
I'm happy to help out here btw, if I know the use case. It'll need a bit more than sending the event 😇
Although (please test) I believe calling the connect
or reinstate
method will already do what a nodeswitch seems to suggest you're looking for :)
yup thats perfect thanks @WietseWind
Expose the nodeswitch event that it can be invoked from the client