@riocrypto/common-server 1.0.1607 → 1.0.1609
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.
|
@@ -301,7 +301,7 @@ class BitsoClient {
|
|
|
301
301
|
});
|
|
302
302
|
}
|
|
303
303
|
getMXNBalance() {
|
|
304
|
-
var _a, _b;
|
|
304
|
+
var _a, _b, _c, _d, _e;
|
|
305
305
|
return __awaiter(this, void 0, void 0, function* () {
|
|
306
306
|
const requestConfig = {
|
|
307
307
|
method: "GET",
|
|
@@ -313,10 +313,15 @@ class BitsoClient {
|
|
|
313
313
|
const signedRequestConfig = this.signRequest(requestConfig);
|
|
314
314
|
const res = yield (0, axios_1.default)(signedRequestConfig);
|
|
315
315
|
const data = res.data;
|
|
316
|
+
console.log("Bitso data");
|
|
317
|
+
console.log(data);
|
|
318
|
+
console.log((_a = data.payload) === null || _a === void 0 ? void 0 : _a.balances);
|
|
319
|
+
console.log((_b = data.payload) === null || _b === void 0 ? void 0 : _b.balances[0]);
|
|
320
|
+
console.log((_c = data.payload) === null || _c === void 0 ? void 0 : _c.balances[1]);
|
|
316
321
|
if (!data.success) {
|
|
317
322
|
throw new Error("Error getting Bitso fees");
|
|
318
323
|
}
|
|
319
|
-
return Number(((
|
|
324
|
+
return Number(((_e = (_d = data.payload) === null || _d === void 0 ? void 0 : _d.balances[0]) === null || _e === void 0 ? void 0 : _e.available) || 0);
|
|
320
325
|
});
|
|
321
326
|
}
|
|
322
327
|
signRequest(requestConfig) {
|