@portal-hq/provider 4.3.1 → 4.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -325,7 +325,7 @@ class Provider {
325
325
  this.dispatchConnect(chainId);
326
326
  }
327
327
  else {
328
- console.error(`[PortalProvider] Invalid chainId format. Must be 'namespace:reference', but got ${chainId}`);
328
+ utils_1.sdkLogger.error(`[PortalProvider] Invalid chainId format. Must be 'namespace:reference', but got ${chainId}`);
329
329
  }
330
330
  return new Promise((resolve) => resolve(this));
331
331
  });
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { PortalCurve } from '@portal-hq/core';
11
- import { Events, HttpRequester, InvalidApiKeyError, InvalidGatewayConfigError, PortalRequests, ProviderRpcError, RpcErrorCodes, DEFAULT_CHAIN_ID_CAIP2, CHAIN_NAMESPACES, DEFAULT_HOSTS, } from '@portal-hq/utils';
11
+ import { Events, HttpRequester, InvalidApiKeyError, InvalidGatewayConfigError, PortalRequests, ProviderRpcError, RpcErrorCodes, DEFAULT_CHAIN_ID_CAIP2, CHAIN_NAMESPACES, DEFAULT_HOSTS, sdkLogger, } from '@portal-hq/utils';
12
12
  import { MpcSigner, EnclaveSigner } from '../signers';
13
13
  const passiveSignerMethods = [
14
14
  'eth_accounts',
@@ -323,7 +323,7 @@ class Provider {
323
323
  this.dispatchConnect(chainId);
324
324
  }
325
325
  else {
326
- console.error(`[PortalProvider] Invalid chainId format. Must be 'namespace:reference', but got ${chainId}`);
326
+ sdkLogger.error(`[PortalProvider] Invalid chainId format. Must be 'namespace:reference', but got ${chainId}`);
327
327
  }
328
328
  return new Promise((resolve) => resolve(this));
329
329
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@portal-hq/provider",
3
- "version": "4.3.1",
3
+ "version": "4.4.0",
4
4
  "license": "MIT",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/esm/index",
@@ -19,8 +19,8 @@
19
19
  "test": "jest"
20
20
  },
21
21
  "dependencies": {
22
- "@portal-hq/connect": "^4.3.1",
23
- "@portal-hq/utils": "^4.3.1",
22
+ "@portal-hq/connect": "^4.4.0",
23
+ "@portal-hq/utils": "^4.4.0",
24
24
  "@types/react-native-uuid": "^2.0.0",
25
25
  "react-native-uuid": "^2.0.3"
26
26
  },
@@ -32,5 +32,5 @@
32
32
  "ts-jest": "^29.0.3",
33
33
  "typescript": "^4.8.4"
34
34
  },
35
- "gitHead": "0cfb3fc21c050a54e73044a87b92ac22f9e2edb7"
35
+ "gitHead": "76ce311809d877d0f8aa5373b0f4e9d85ee963f0"
36
36
  }
@@ -14,6 +14,7 @@ import {
14
14
  DEFAULT_CHAIN_ID_CAIP2,
15
15
  CHAIN_NAMESPACES,
16
16
  DEFAULT_HOSTS,
17
+ sdkLogger,
17
18
  } from '@portal-hq/utils'
18
19
  import { AddressesByNamespace, RpcErrorOptions } from '@portal-hq/utils/types'
19
20
 
@@ -412,7 +413,7 @@ class Provider implements IPortalProvider {
412
413
  // Dispatch 'connect' event
413
414
  this.dispatchConnect(chainId)
414
415
  } else {
415
- console.error(
416
+ sdkLogger.error(
416
417
  `[PortalProvider] Invalid chainId format. Must be 'namespace:reference', but got ${chainId}`,
417
418
  )
418
419
  }