@0xsequence/provider 0.0.0-20230217200148 → 0.0.0-20230302200348
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.
|
@@ -2157,12 +2157,11 @@ class WalletRequestHandler {
|
|
|
2157
2157
|
networks,
|
|
2158
2158
|
defaultNetworkId
|
|
2159
2159
|
} = options;
|
|
2160
|
-
if (networks
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
this.setDefaultNetwork(networkId);
|
|
2160
|
+
if (networks !== undefined && networks.length > 0) {
|
|
2161
|
+
const networkId = defaultNetworkId || this.defaultNetworkId;
|
|
2162
|
+
if (networkId) {
|
|
2163
|
+
this.setDefaultNetwork(networkId);
|
|
2164
|
+
}
|
|
2166
2165
|
}
|
|
2167
2166
|
|
|
2168
2167
|
// Optionally, connect the dapp and wallet. In case connectOptions are provided, we will perform
|
|
@@ -2157,12 +2157,11 @@ class WalletRequestHandler {
|
|
|
2157
2157
|
networks,
|
|
2158
2158
|
defaultNetworkId
|
|
2159
2159
|
} = options;
|
|
2160
|
-
if (networks
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
this.setDefaultNetwork(networkId);
|
|
2160
|
+
if (networks !== undefined && networks.length > 0) {
|
|
2161
|
+
const networkId = defaultNetworkId || this.defaultNetworkId;
|
|
2162
|
+
if (networkId) {
|
|
2163
|
+
this.setDefaultNetwork(networkId);
|
|
2164
|
+
}
|
|
2166
2165
|
}
|
|
2167
2166
|
|
|
2168
2167
|
// Optionally, connect the dapp and wallet. In case connectOptions are provided, we will perform
|
|
@@ -2153,12 +2153,11 @@ class WalletRequestHandler {
|
|
|
2153
2153
|
networks,
|
|
2154
2154
|
defaultNetworkId
|
|
2155
2155
|
} = options;
|
|
2156
|
-
if (networks
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
this.setDefaultNetwork(networkId);
|
|
2156
|
+
if (networks !== undefined && networks.length > 0) {
|
|
2157
|
+
const networkId = defaultNetworkId || this.defaultNetworkId;
|
|
2158
|
+
if (networkId) {
|
|
2159
|
+
this.setDefaultNetwork(networkId);
|
|
2160
|
+
}
|
|
2162
2161
|
}
|
|
2163
2162
|
|
|
2164
2163
|
// Optionally, connect the dapp and wallet. In case connectOptions are provided, we will perform
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xsequence/provider",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-20230302200348",
|
|
4
4
|
"description": "provider sub-package for Sequence",
|
|
5
5
|
"repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/provider",
|
|
6
6
|
"source": "src/index.ts",
|
|
@@ -9,20 +9,20 @@
|
|
|
9
9
|
"author": "Horizon Blockchain Games",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@0xsequence/abi": "0.0.0-
|
|
13
|
-
"@0xsequence/account": "0.0.0-
|
|
14
|
-
"@0xsequence/auth": "0.0.0-
|
|
15
|
-
"@0xsequence/core": "0.0.0-
|
|
16
|
-
"@0xsequence/migration": "0.0.0-
|
|
17
|
-
"@0xsequence/network": "0.0.0-
|
|
18
|
-
"@0xsequence/relayer": "0.0.0-
|
|
19
|
-
"@0xsequence/utils": "0.0.0-
|
|
20
|
-
"@0xsequence/wallet": "0.0.0-
|
|
12
|
+
"@0xsequence/abi": "0.0.0-20230302200348",
|
|
13
|
+
"@0xsequence/account": "0.0.0-20230302200348",
|
|
14
|
+
"@0xsequence/auth": "0.0.0-20230302200348",
|
|
15
|
+
"@0xsequence/core": "0.0.0-20230302200348",
|
|
16
|
+
"@0xsequence/migration": "0.0.0-20230302200348",
|
|
17
|
+
"@0xsequence/network": "0.0.0-20230302200348",
|
|
18
|
+
"@0xsequence/relayer": "0.0.0-20230302200348",
|
|
19
|
+
"@0xsequence/utils": "0.0.0-20230302200348",
|
|
20
|
+
"@0xsequence/wallet": "0.0.0-20230302200348",
|
|
21
21
|
"eventemitter2": "^6.4.5",
|
|
22
22
|
"webextension-polyfill": "^0.10.0"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"ethers": ">=5.5"
|
|
25
|
+
"ethers": ">=5.5 < 6"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/webextension-polyfill": "^0.10.0",
|
|
@@ -89,13 +89,11 @@ export class WalletRequestHandler implements ExternalProvider, JsonRpcHandler, P
|
|
|
89
89
|
|
|
90
90
|
const { connect, networks, defaultNetworkId } = options
|
|
91
91
|
|
|
92
|
-
if (networks
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
if (networkId) {
|
|
98
|
-
this.setDefaultNetwork(networkId)
|
|
92
|
+
if (networks !== undefined && networks.length > 0) {
|
|
93
|
+
const networkId = defaultNetworkId || this.defaultNetworkId
|
|
94
|
+
if (networkId) {
|
|
95
|
+
this.setDefaultNetwork(networkId)
|
|
96
|
+
}
|
|
99
97
|
}
|
|
100
98
|
|
|
101
99
|
// Optionally, connect the dapp and wallet. In case connectOptions are provided, we will perform
|