@cryptorubic/web3 1.0.0-alpha.no-sdk.34 → 1.0.0-alpha.no-sdk.35
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.
package/package.json
CHANGED
|
@@ -10,6 +10,9 @@ export declare abstract class AbstractAdapter<P, W, B extends BlockchainName, Se
|
|
|
10
10
|
abstract signer: AbstractAdapterSigner<W, SendTxParams, SendTxResponse>;
|
|
11
11
|
protected readonly logger?: ICustomLogger;
|
|
12
12
|
protected readonly blockchain: B;
|
|
13
|
+
/**
|
|
14
|
+
* used to pass public pointer in signer constructor
|
|
15
|
+
*/
|
|
13
16
|
private _publicRef;
|
|
14
17
|
protected set public(value: P | null);
|
|
15
18
|
get public(): P;
|
|
@@ -25,6 +25,9 @@ class AbstractAdapter {
|
|
|
25
25
|
return !!this._publicRef.public;
|
|
26
26
|
}
|
|
27
27
|
constructor(blockchain, logger) {
|
|
28
|
+
/**
|
|
29
|
+
* used to pass public pointer in signer constructor
|
|
30
|
+
*/
|
|
28
31
|
this._publicRef = { public: null };
|
|
29
32
|
this.blockchain = blockchain;
|
|
30
33
|
if (logger) {
|
|
@@ -93,8 +93,10 @@ class BlockchainAdapterFactoryService {
|
|
|
93
93
|
const adapter = this.adapterStore[blockchain];
|
|
94
94
|
adapter.signer.setWalletAddress(wallet.address);
|
|
95
95
|
adapter.signer.setWallet(wallet.core);
|
|
96
|
-
|
|
97
|
-
adapter.
|
|
96
|
+
Object.values(this.adapterStore).forEach((adapter) => {
|
|
97
|
+
if (!adapter.connected)
|
|
98
|
+
adapter.initWeb3Client();
|
|
99
|
+
});
|
|
98
100
|
}
|
|
99
101
|
}
|
|
100
102
|
exports.BlockchainAdapterFactoryService = BlockchainAdapterFactoryService;
|