Skip to content

Commit

Permalink
fix: create agent for ws server
Browse files Browse the repository at this point in the history
  • Loading branch information
NikosFotiadis committed Jun 29, 2020
1 parent 33f4b48 commit 5e28251
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/dappflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -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})
});
Expand Down

0 comments on commit 5e28251

Please sign in to comment.