From 5e282516b1bbce72813dc2eb433f3e1f4f219974 Mon Sep 17 00:00:00 2001 From: Nikos Fotiadis Date: Mon, 29 Jun 2020 09:49:34 +0300 Subject: [PATCH] fix: create agent for ws server --- src/dappflow.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/dappflow.js b/src/dappflow.js index 8a4e39a..46985d7 100644 --- a/src/dappflow.js +++ b/src/dappflow.js @@ -6,12 +6,18 @@ const SETTINGS = { host: 'api.dappflow.com' }; +const SETTINGS_WS = { + host: 'ws.dappflow.com' +}; + const init = async ({clientSecret, clientId, privKey}, signer = sdkSigner(privKey)) => { const httpAgent = createHttpAgent({clientSecret, clientId}, SETTINGS); const wsAgent = createWsAgent({clientSecret, clientId}, SETTINGS); + const wsServerAgent = createWsAgent({clientSecret, clientId}, SETTINGS_WS); const resources = await createResources({ httpAgent, wsAgent, + wsServerAgent, signer, getAccessToken: getAccessToken({clientSecret, clientId}) });