@diviswap/sdk 1.7.8 → 1.7.9
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/dist/cli/index.js +8 -4
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -361,6 +361,9 @@ function httpsRequest(url, options) {
|
|
|
361
361
|
req.destroy();
|
|
362
362
|
reject(new Error("Request timeout"));
|
|
363
363
|
});
|
|
364
|
+
if (options.body) {
|
|
365
|
+
req.write(options.body);
|
|
366
|
+
}
|
|
364
367
|
req.end();
|
|
365
368
|
});
|
|
366
369
|
}
|
|
@@ -368,8 +371,8 @@ async function validatePartnerCredentials(keyId, secretKey, authMethod = "hmac",
|
|
|
368
371
|
try {
|
|
369
372
|
const apiUrl = environment === "sandbox" ? "https://dev-api.liberex.sv" : "https://api.liberex.sv";
|
|
370
373
|
const testPath = "/api/v1/fees";
|
|
371
|
-
const method = "
|
|
372
|
-
const body = "";
|
|
374
|
+
const method = "POST";
|
|
375
|
+
const body = "{}";
|
|
373
376
|
let headers = {
|
|
374
377
|
"Content-Type": "application/json",
|
|
375
378
|
"X-Client-Id": keyId
|
|
@@ -384,8 +387,9 @@ async function validatePartnerCredentials(keyId, secretKey, authMethod = "hmac",
|
|
|
384
387
|
const response = await httpsRequest(`${apiUrl}${testPath}`, {
|
|
385
388
|
method,
|
|
386
389
|
headers,
|
|
387
|
-
timeout: 1e4
|
|
390
|
+
timeout: 1e4,
|
|
388
391
|
// 10 second timeout
|
|
392
|
+
body
|
|
389
393
|
});
|
|
390
394
|
if (response.status === 200 || response.status === 403) {
|
|
391
395
|
return {
|
|
@@ -1918,7 +1922,7 @@ async function uninstall(options = {}) {
|
|
|
1918
1922
|
}
|
|
1919
1923
|
|
|
1920
1924
|
// package.json
|
|
1921
|
-
var version = "1.7.
|
|
1925
|
+
var version = "1.7.9";
|
|
1922
1926
|
|
|
1923
1927
|
// src/cli/index.ts
|
|
1924
1928
|
var program = new commander.Command();
|