MCPcopy Index your code
hub / github.com/Criptext/Criptext-Email-React-Client / initializeClient

Function initializeClient

electron_app/src/clientManager.js:21–41  ·  view source on GitHub ↗
({
  recipientId,
  token,
  refreshToken,
  language,
  os
})

Source from the content-addressed store, hash-verified

19const clientsMap = new Map();
20
21const initializeClient = ({
22 recipientId,
23 token,
24 refreshToken,
25 language,
26 os
27}) => {
28 const client = new ClientAPI({
29 os,
30 token,
31 language,
32 appVersion,
33 refreshToken,
34 url: SERVER_URL,
35 timeout: 60 * 1000,
36 version: API_CLIENT_VERSION,
37 errorCallback: handleClientError
38 });
39 clientsMap[recipientId] = client;
40 return client;
41};
42
43const handleClientError = err => {
44 const NO_INTERNET_CONNECTION_CODE = 'ENOTFOUND';

Callers 1

createClientFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected