@cityofzion/bs-multichain 1.1.11 → 1.1.13

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.
@@ -15,7 +15,8 @@ const jsonrpc_utils_1 = require("@walletconnect/jsonrpc-utils");
15
15
  const utils_1 = require("@walletconnect/utils");
16
16
  class WalletKitHelper {
17
17
  static getProposalDetails({ address, proposal, service, }) {
18
- const mergedNamespacesObject = (0, utils_1.mergeRequiredAndOptionalNamespaces)(proposal.requiredNamespaces, proposal.optionalNamespaces);
18
+ var _a, _b;
19
+ const mergedNamespacesObject = (0, utils_1.mergeRequiredAndOptionalNamespaces)((_a = proposal === null || proposal === void 0 ? void 0 : proposal.requiredNamespaces) !== null && _a !== void 0 ? _a : {}, (_b = proposal === null || proposal === void 0 ? void 0 : proposal.optionalNamespaces) !== null && _b !== void 0 ? _b : {});
19
20
  const allChains = new Set((0, utils_1.getChainsFromRequiredNamespaces)(mergedNamespacesObject));
20
21
  if (!(0, blockchain_service_1.hasWalletConnect)(service) || !allChains.has(service.walletConnectService.chain))
21
22
  throw new blockchain_service_1.BSError('Requested chain(s) not supported by any service', 'NO_SERVICE');
@@ -37,7 +38,8 @@ class WalletKitHelper {
37
38
  return { approvedNamespaces, methods, service, blockchain: service.name };
38
39
  }
39
40
  static getProposalServices({ proposal, services }) {
40
- const mergedNamespacesObject = (0, utils_1.mergeRequiredAndOptionalNamespaces)(proposal.requiredNamespaces, proposal.optionalNamespaces);
41
+ var _a, _b;
42
+ const mergedNamespacesObject = (0, utils_1.mergeRequiredAndOptionalNamespaces)((_a = proposal === null || proposal === void 0 ? void 0 : proposal.requiredNamespaces) !== null && _a !== void 0 ? _a : {}, (_b = proposal === null || proposal === void 0 ? void 0 : proposal.optionalNamespaces) !== null && _b !== void 0 ? _b : {});
41
43
  const allChains = new Set((0, utils_1.getChainsFromRequiredNamespaces)(mergedNamespacesObject));
42
44
  const proposalServices = services.filter((service) => (0, blockchain_service_1.hasWalletConnect)(service) && allChains.has(service.walletConnectService.chain));
43
45
  return proposalServices;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cityofzion/bs-multichain",
3
- "version": "1.1.11",
3
+ "version": "1.1.13",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "repository": "https://github.com/CityOfZion/blockchain-services",
@@ -26,9 +26,9 @@
26
26
  "ts-node": "~10.9.2",
27
27
  "typescript": "~5.9.2",
28
28
  "typed-emitter": "~2.1.0",
29
- "@cityofzion/bs-neo3": "1.17.7",
30
- "@cityofzion/bs-neox": "1.5.0",
31
- "@cityofzion/bs-ethereum": "2.14.8"
29
+ "@cityofzion/bs-neox": "1.5.1",
30
+ "@cityofzion/bs-ethereum": "2.14.8",
31
+ "@cityofzion/bs-neo3": "1.17.7"
32
32
  },
33
33
  "scripts": {
34
34
  "build": "rm -rf ./dist && tsc --project tsconfig.build.json",