@0xsequence/provider 0.39.4 → 0.39.5
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.
|
@@ -3752,9 +3752,11 @@ class Wallet {
|
|
|
3752
3752
|
if (!this.config.networks && !this.config.networkRpcUrl) {
|
|
3753
3753
|
this.networks = networks;
|
|
3754
3754
|
return;
|
|
3755
|
-
} //
|
|
3755
|
+
} // init networks
|
|
3756
3756
|
|
|
3757
3757
|
|
|
3758
|
+
this.networks = networks; // combine custom network config with networks in the session
|
|
3759
|
+
|
|
3758
3760
|
if (this.config.networks) {
|
|
3759
3761
|
this.networks = networks.map(n => _extends({}, n)); // copy
|
|
3760
3762
|
|
|
@@ -3768,7 +3770,11 @@ class Wallet {
|
|
|
3768
3770
|
|
|
3769
3771
|
|
|
3770
3772
|
if (this.config.networkRpcUrl) {
|
|
3771
|
-
this.networks.find(network => network.isDefaultChain)
|
|
3773
|
+
const network = this.networks.find(network => network.isDefaultChain);
|
|
3774
|
+
|
|
3775
|
+
if (network) {
|
|
3776
|
+
network.rpcUrl = this.config.networkRpcUrl;
|
|
3777
|
+
}
|
|
3772
3778
|
}
|
|
3773
3779
|
}
|
|
3774
3780
|
|
|
@@ -3752,9 +3752,11 @@ class Wallet {
|
|
|
3752
3752
|
if (!this.config.networks && !this.config.networkRpcUrl) {
|
|
3753
3753
|
this.networks = networks;
|
|
3754
3754
|
return;
|
|
3755
|
-
} //
|
|
3755
|
+
} // init networks
|
|
3756
3756
|
|
|
3757
3757
|
|
|
3758
|
+
this.networks = networks; // combine custom network config with networks in the session
|
|
3759
|
+
|
|
3758
3760
|
if (this.config.networks) {
|
|
3759
3761
|
this.networks = networks.map(n => _extends({}, n)); // copy
|
|
3760
3762
|
|
|
@@ -3768,7 +3770,11 @@ class Wallet {
|
|
|
3768
3770
|
|
|
3769
3771
|
|
|
3770
3772
|
if (this.config.networkRpcUrl) {
|
|
3771
|
-
this.networks.find(network => network.isDefaultChain)
|
|
3773
|
+
const network = this.networks.find(network => network.isDefaultChain);
|
|
3774
|
+
|
|
3775
|
+
if (network) {
|
|
3776
|
+
network.rpcUrl = this.config.networkRpcUrl;
|
|
3777
|
+
}
|
|
3772
3778
|
}
|
|
3773
3779
|
}
|
|
3774
3780
|
|
|
@@ -3748,9 +3748,11 @@ class Wallet {
|
|
|
3748
3748
|
if (!this.config.networks && !this.config.networkRpcUrl) {
|
|
3749
3749
|
this.networks = networks;
|
|
3750
3750
|
return;
|
|
3751
|
-
} //
|
|
3751
|
+
} // init networks
|
|
3752
3752
|
|
|
3753
3753
|
|
|
3754
|
+
this.networks = networks; // combine custom network config with networks in the session
|
|
3755
|
+
|
|
3754
3756
|
if (this.config.networks) {
|
|
3755
3757
|
this.networks = networks.map(n => _extends({}, n)); // copy
|
|
3756
3758
|
|
|
@@ -3764,7 +3766,11 @@ class Wallet {
|
|
|
3764
3766
|
|
|
3765
3767
|
|
|
3766
3768
|
if (this.config.networkRpcUrl) {
|
|
3767
|
-
this.networks.find(network => network.isDefaultChain)
|
|
3769
|
+
const network = this.networks.find(network => network.isDefaultChain);
|
|
3770
|
+
|
|
3771
|
+
if (network) {
|
|
3772
|
+
network.rpcUrl = this.config.networkRpcUrl;
|
|
3773
|
+
}
|
|
3768
3774
|
}
|
|
3769
3775
|
}
|
|
3770
3776
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xsequence/provider",
|
|
3
|
-
"version": "0.39.
|
|
3
|
+
"version": "0.39.5",
|
|
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",
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
"typecheck": "tsc --noEmit"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@0xsequence/abi": "^0.39.
|
|
17
|
-
"@0xsequence/auth": "^0.39.
|
|
18
|
-
"@0xsequence/config": "^0.39.
|
|
19
|
-
"@0xsequence/network": "^0.39.
|
|
20
|
-
"@0xsequence/transactions": "^0.39.
|
|
21
|
-
"@0xsequence/utils": "^0.39.
|
|
22
|
-
"@0xsequence/wallet": "^0.39.
|
|
16
|
+
"@0xsequence/abi": "^0.39.5",
|
|
17
|
+
"@0xsequence/auth": "^0.39.5",
|
|
18
|
+
"@0xsequence/config": "^0.39.5",
|
|
19
|
+
"@0xsequence/network": "^0.39.5",
|
|
20
|
+
"@0xsequence/transactions": "^0.39.5",
|
|
21
|
+
"@0xsequence/utils": "^0.39.5",
|
|
22
|
+
"@0xsequence/wallet": "^0.39.5",
|
|
23
23
|
"@ethersproject/abstract-signer": "^5.5.0",
|
|
24
24
|
"@ethersproject/hash": "^5.5.0",
|
|
25
25
|
"@ethersproject/providers": "^5.5.1",
|
package/src/wallet.ts
CHANGED
|
@@ -619,6 +619,9 @@ export class Wallet implements WalletProvider {
|
|
|
619
619
|
return
|
|
620
620
|
}
|
|
621
621
|
|
|
622
|
+
// init networks
|
|
623
|
+
this.networks = networks
|
|
624
|
+
|
|
622
625
|
// combine custom network config with networks in the session
|
|
623
626
|
if (this.config.networks) {
|
|
624
627
|
this.networks = networks.map(n => ({ ...n })) // copy
|
|
@@ -632,7 +635,10 @@ export class Wallet implements WalletProvider {
|
|
|
632
635
|
|
|
633
636
|
// an extra override for convenience
|
|
634
637
|
if (this.config.networkRpcUrl) {
|
|
635
|
-
this.networks.find(network => network.isDefaultChain)
|
|
638
|
+
const network = this.networks.find(network => network.isDefaultChain)
|
|
639
|
+
if (network) {
|
|
640
|
+
network.rpcUrl = this.config.networkRpcUrl
|
|
641
|
+
}
|
|
636
642
|
}
|
|
637
643
|
}
|
|
638
644
|
|