@pioneer-platform/ripple-network 8.1.37 → 8.1.39
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/lib/index.d.ts +1 -1
- package/lib/index.js +10 -3
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -89,7 +89,8 @@ module.exports = {
|
|
|
89
89
|
return __generator(this, function (_a) {
|
|
90
90
|
switch (_a.label) {
|
|
91
91
|
case 0:
|
|
92
|
-
client = new xrpl.Client("wss://s.altnet.rippletest.net:51233")
|
|
92
|
+
// client = new xrpl.Client("wss://s.altnet.rippletest.net:51233")
|
|
93
|
+
client = new xrpl.Client("wss://xrplcluster.com/");
|
|
93
94
|
return [4 /*yield*/, client.connect()];
|
|
94
95
|
case 1:
|
|
95
96
|
_a.sent();
|
|
@@ -420,13 +421,19 @@ var get_balance = function (address) {
|
|
|
420
421
|
output = 0;
|
|
421
422
|
return [4 /*yield*/, client.request({
|
|
422
423
|
"command": "account_info",
|
|
423
|
-
"account":
|
|
424
|
+
"account": address,
|
|
424
425
|
"ledger_index": "validated"
|
|
425
426
|
})];
|
|
426
427
|
case 2:
|
|
427
428
|
response = _a.sent();
|
|
428
429
|
console.log(response);
|
|
429
|
-
|
|
430
|
+
console.log(response.result);
|
|
431
|
+
console.log(response.result.account_data);
|
|
432
|
+
console.log(response.result.account_data.Account);
|
|
433
|
+
console.log(response.result.account_data.Balance);
|
|
434
|
+
console.log(response.result.account_data.Balance / 1000000);
|
|
435
|
+
response.result.account_data.Balance = parseFloat(response.result.account_data.Balance) / 1000000;
|
|
436
|
+
return [2 /*return*/, response.result.account_data.Balance];
|
|
430
437
|
case 3:
|
|
431
438
|
e_1 = _a.sent();
|
|
432
439
|
log.error(tag, "e: ", e_1);
|