quantum-coin-js-sdk 1.0.22 → 1.0.23
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/example/example-wallet.js +2 -2
- package/example/package-lock.json +1 -1
- package/index.js +4 -5
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const qcsdk = require('quantum-coin-js-sdk');
|
|
2
2
|
|
|
3
|
-
var clientConfigVal = new qcsdk.Config("https://sdk.readrelay.quantumcoinapi.com", "https://sdk.writerelay.quantumcoinapi.com", 123123, "", ""); //Mainnet
|
|
3
|
+
//var clientConfigVal = new qcsdk.Config("https://sdk.readrelay.quantumcoinapi.com", "https://sdk.writerelay.quantumcoinapi.com", 123123, "", ""); //Mainnet
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
//Initialize the client configuration
|
|
@@ -17,7 +17,7 @@ var clientConfigVal = new qcsdk.Config("https://sdk.readrelay.quantumcoinapi.com
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
//Initialize the SDK
|
|
20
|
-
qcsdk.initialize(
|
|
20
|
+
qcsdk.initialize(undefined).then((initResult) => {
|
|
21
21
|
if (initResult === false) {
|
|
22
22
|
console.error("Initialize failed");
|
|
23
23
|
return;
|
package/index.js
CHANGED
|
@@ -702,11 +702,10 @@ async function initialize(clientConfig) {
|
|
|
702
702
|
return false;
|
|
703
703
|
}
|
|
704
704
|
if (clientConfig === null || clientConfig === undefined) {
|
|
705
|
-
clientConfig = Config("https://sdk.readrelay.quantumcoinapi.com", "https://sdk.writerelay.quantumcoinapi.com", 123123, "", ""); //default
|
|
706
|
-
}
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
}
|
|
705
|
+
clientConfig = new Config("https://sdk.readrelay.quantumcoinapi.com", "https://sdk.writerelay.quantumcoinapi.com", 123123, "", ""); //default
|
|
706
|
+
}
|
|
707
|
+
if (clientConfig.readUrl === null || clientConfig.writeUrl === null || clientConfig.chainId === null) {
|
|
708
|
+
return false;
|
|
710
709
|
}
|
|
711
710
|
await InitAccountsWebAssembly();
|
|
712
711
|
config = clientConfig;
|