Possibilty to change gateway ws listener (#1779)
* add: set gatewayListener * Update types.ts * Update worker.ts
This commit is contained in:
@@ -27,6 +27,11 @@ export interface NymClientConfig {
|
||||
* Optional. The identity key of the preferred gateway to connect to.
|
||||
*/
|
||||
preferredGatewayIdentityKey?: string;
|
||||
|
||||
/**
|
||||
* Optional. The listener websocket of the preferred gateway to connect to.
|
||||
*/
|
||||
gatewayListener?: string;
|
||||
|
||||
/**
|
||||
* Optional. Settings for the WASM client.
|
||||
|
||||
@@ -133,7 +133,11 @@ wasm_bindgen(wasmUrl)
|
||||
config.validatorApiUrl,
|
||||
config.preferredGatewayIdentityKey,
|
||||
);
|
||||
|
||||
|
||||
// set a different gatewayListener in order to avoid workaround ws over https error
|
||||
if (config.gatewayListener)
|
||||
gatewayEndpoint.gateway_listener = config.gatewayListener;
|
||||
|
||||
// create the client, passing handlers for events
|
||||
wrapper.init(
|
||||
new wasm_bindgen.Config(
|
||||
|
||||
Reference in New Issue
Block a user