@cityofzion/bs-multichain 1.1.0 → 1.1.2
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.
|
@@ -77,26 +77,23 @@ class WalletKitHelper {
|
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
79
|
static filterSessions(sessions, filters) {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
if (address && filters.addresses.includes(address)) {
|
|
88
|
-
matched = true;
|
|
89
|
-
}
|
|
80
|
+
const filteredSessions = sessions.filter(session => {
|
|
81
|
+
let matched = false;
|
|
82
|
+
if (filters.addresses) {
|
|
83
|
+
const sessionAccounts = (0, utils_1.getAccountsFromNamespaces)(session.namespaces);
|
|
84
|
+
const [address] = (0, utils_1.getAddressesFromAccounts)(sessionAccounts);
|
|
85
|
+
if (address && filters.addresses.includes(address)) {
|
|
86
|
+
matched = true;
|
|
90
87
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
88
|
+
}
|
|
89
|
+
if (filters.namespaces && !matched) {
|
|
90
|
+
const namespaces = Object.keys(session.namespaces);
|
|
91
|
+
if (namespaces.some(namespace => { var _a; return (_a = filters.namespaces) === null || _a === void 0 ? void 0 : _a.includes(namespace); })) {
|
|
92
|
+
matched = true;
|
|
96
93
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
94
|
+
}
|
|
95
|
+
return matched;
|
|
96
|
+
});
|
|
100
97
|
return filteredSessions;
|
|
101
98
|
}
|
|
102
99
|
static isValidURI(uri) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cityofzion/bs-multichain",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"repository": "https://github.com/CityOfZion/blockchain-services",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"axios": "~1.12.2",
|
|
14
14
|
"@walletconnect/utils": "~2.21.9",
|
|
15
15
|
"@walletconnect/jsonrpc-utils": "~1.0.8",
|
|
16
|
-
"@cityofzion/blockchain-service": "1.22.
|
|
16
|
+
"@cityofzion/blockchain-service": "1.22.1"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@types/node": "~24.5.2",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"ts-node": "~10.9.2",
|
|
27
27
|
"typescript": "~5.9.2",
|
|
28
28
|
"typed-emitter": "~2.1.0",
|
|
29
|
-
"@cityofzion/bs-ethereum": "2.14.
|
|
30
|
-
"@cityofzion/bs-
|
|
31
|
-
"@cityofzion/bs-
|
|
32
|
-
"@cityofzion/bs-
|
|
29
|
+
"@cityofzion/bs-ethereum": "2.14.1",
|
|
30
|
+
"@cityofzion/bs-neox": "1.4.1",
|
|
31
|
+
"@cityofzion/bs-neo3": "1.17.1",
|
|
32
|
+
"@cityofzion/bs-neo-legacy": "1.13.6"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"build": "rm -rf ./dist && tsc --project tsconfig.build.json",
|