@flashbacktech/flashbackclient 0.1.35 → 0.1.36
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.
|
@@ -30,23 +30,31 @@ const getServer = (network) => {
|
|
|
30
30
|
let serverUrl = "";
|
|
31
31
|
switch (network.network) {
|
|
32
32
|
case "TESTNET":
|
|
33
|
-
serverUrl = "https://soroban-testnet.stellar.org
|
|
33
|
+
serverUrl = "https://soroban-testnet.stellar.org";
|
|
34
34
|
break;
|
|
35
35
|
case "PUBLIC":
|
|
36
|
-
serverUrl = "https://rpc.stellar.org
|
|
36
|
+
serverUrl = "https://rpc.stellar.org";
|
|
37
37
|
break;
|
|
38
38
|
}
|
|
39
|
-
|
|
39
|
+
// For newer versions of Stellar SDK, we need to allow HTTP connections
|
|
40
|
+
// even for HTTPS URLs due to how the SDK handles server connections
|
|
41
|
+
const server = new stellar_sdk_2.rpc.Server(serverUrl, {
|
|
42
|
+
allowHttp: true
|
|
43
|
+
});
|
|
40
44
|
return server;
|
|
41
45
|
};
|
|
42
46
|
exports.getServer = getServer;
|
|
43
47
|
const TIMEOUT_TRANSACTION = 60;
|
|
44
48
|
const getHorizonServer = (network) => {
|
|
45
49
|
if (network === "TESTNET") {
|
|
46
|
-
return new stellar_sdk_1.Horizon.Server("https://horizon-testnet.stellar.org"
|
|
50
|
+
return new stellar_sdk_1.Horizon.Server("https://horizon-testnet.stellar.org", {
|
|
51
|
+
allowHttp: true
|
|
52
|
+
});
|
|
47
53
|
}
|
|
48
54
|
else {
|
|
49
|
-
return new stellar_sdk_1.Horizon.Server("https://horizon.stellar.org"
|
|
55
|
+
return new stellar_sdk_1.Horizon.Server("https://horizon.stellar.org", {
|
|
56
|
+
allowHttp: true
|
|
57
|
+
});
|
|
50
58
|
}
|
|
51
59
|
};
|
|
52
60
|
exports.getHorizonServer = getHorizonServer;
|