mirror of
https://github.com/alexbosworth/balanceofsatoshis.git
synced 2026-08-13 12:33:37 +02:00
remove fiat reporting
This commit is contained in:
parent
dc13fb2327
commit
8fef9fbebd
6 changed files with 609 additions and 553 deletions
|
|
@ -1,5 +1,9 @@
|
|||
# Versions
|
||||
|
||||
## 19.4.11
|
||||
|
||||
- `report`: remove fiat
|
||||
|
||||
## 19.4.10
|
||||
|
||||
- Add support for LND 0.18.5
|
||||
|
|
|
|||
1126
package-lock.json
generated
1126
package-lock.json
generated
File diff suppressed because it is too large
Load diff
10
package.json
10
package.json
|
|
@ -31,13 +31,13 @@
|
|||
"csv-parse": "5.6.0",
|
||||
"ecpair": "2.1.0",
|
||||
"goldengate": "14.0.10",
|
||||
"grammy": "1.35.0",
|
||||
"grammy": "1.36.1",
|
||||
"hot-formula-parser": "4.0.0",
|
||||
"import-lazy": "4.0.0",
|
||||
"ini": "5.0.0",
|
||||
"inquirer": "12.4.2",
|
||||
"inquirer": "12.6.0",
|
||||
"ln-accounting": "8.0.6",
|
||||
"ln-service": "57.23.1",
|
||||
"ln-service": "57.24.0",
|
||||
"ln-sync": "6.4.0",
|
||||
"ln-telegram": "6.1.11",
|
||||
"minimist": "1.2.8",
|
||||
|
|
@ -56,7 +56,7 @@
|
|||
"description": "Lightning balance CLI",
|
||||
"devDependencies": {
|
||||
"invoices": "3.0.0",
|
||||
"ln-docker-daemons": "6.0.23"
|
||||
"ln-docker-daemons": "6.0.24"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
|
|
@ -83,5 +83,5 @@
|
|||
"postpublish": "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t alexbosworth/balanceofsatoshis -t alexbosworth/balanceofsatoshis:$npm_package_version --push .",
|
||||
"test": "npx nyc@17.1.0 node --experimental-test-coverage --test test/arrays/*.js test/balances/*.js test/chain/*.js test/display/*.js test/encryption/*.js test/lnd/*.js test/network/*.js test/nodes/*.js test/peers/*.js test/responses/*.js test/routing/*.js test/services/*.js test/swaps/*.js test/tags/*.js test/telegram/*.js test/wallets/*.js"
|
||||
},
|
||||
"version": "19.4.10"
|
||||
"version": "19.4.11"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,10 +15,7 @@ const report = [
|
|||
details: 'alias',
|
||||
},
|
||||
{
|
||||
details: '0.00000001 CURRENCY ($0.00)',
|
||||
},
|
||||
{
|
||||
details: '1 CURRENCY~$1.00',
|
||||
details: '0.00000001 CURRENCY',
|
||||
},
|
||||
{},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ const {getInvoices} = require('ln-service');
|
|||
const {getNetwork} = require('ln-sync');
|
||||
const {getNetworkGraph} = require('ln-service');
|
||||
const {getPayments} = require('ln-sync');
|
||||
const {getPrices} = require('@alexbosworth/fiat');
|
||||
const {getWalletInfo} = require('ln-service');
|
||||
const {italicize} = require('@alexbosworth/html2unicode');
|
||||
const moment = require('moment');
|
||||
|
|
@ -58,11 +57,6 @@ module.exports = ({fs, node, request, style}, cbk) => {
|
|||
// Get authenticated lnd connection
|
||||
getLnd: cbk => authenticatedLnd({node}, cbk),
|
||||
|
||||
// Get exchange rate
|
||||
getRate: cbk => {
|
||||
return getPrices({request, from: rateProvider, symbols: [fiat]}, cbk);
|
||||
},
|
||||
|
||||
// Get balance
|
||||
getBalance: ['getLnd', ({getLnd}, cbk) => {
|
||||
return getBalance({node, lnd: getLnd.lnd}, cbk);
|
||||
|
|
@ -225,7 +219,6 @@ module.exports = ({fs, node, request, style}, cbk) => {
|
|||
'getInvoices',
|
||||
'getNetwork',
|
||||
'getPayments',
|
||||
'getRate',
|
||||
'getRebalances',
|
||||
({
|
||||
currency,
|
||||
|
|
@ -241,7 +234,6 @@ module.exports = ({fs, node, request, style}, cbk) => {
|
|||
getInvoices,
|
||||
getNetwork,
|
||||
getPayments,
|
||||
getRate,
|
||||
getRebalances,
|
||||
}, cbk) =>
|
||||
{
|
||||
|
|
@ -259,7 +251,6 @@ module.exports = ({fs, node, request, style}, cbk) => {
|
|||
channel_balance: getBalance.channel_balance,
|
||||
latest_block_at: getInfo.latest_block_at,
|
||||
public_key: getInfo.public_key,
|
||||
rate: getRate.tickers.find(n => n.ticker === fiat).rate,
|
||||
});
|
||||
|
||||
const channelsActivity = channelsAsReportActivity({
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ const percentFormat = n => isNaN(n) ? '0' : (n * 100).toFixed();
|
|||
currency: <Currency String>
|
||||
latest_block_at: <Last Block At ISO 8601 Date String>
|
||||
public_key: <Public Key Hex String>
|
||||
rate: <Fiat Rate Number>
|
||||
}
|
||||
|
||||
@returns
|
||||
|
|
@ -30,8 +29,6 @@ const percentFormat = n => isNaN(n) ? '0' : (n * 100).toFixed();
|
|||
module.exports = args => {
|
||||
const balance = formatAsBigUnit(args.balance);
|
||||
|
||||
const fiatBalance = dollarFormat(balance * args.rate);
|
||||
|
||||
const report = [
|
||||
{
|
||||
subtitle: 'current status',
|
||||
|
|
@ -44,10 +41,7 @@ module.exports = args => {
|
|||
details: args.alias,
|
||||
},
|
||||
{
|
||||
details: `${balance} ${args.currency} ($${fiatBalance})`,
|
||||
},
|
||||
{
|
||||
details: `1 ${args.currency}~$${dollarFormat(args.rate)}`,
|
||||
details: `${balance} ${args.currency}`,
|
||||
},
|
||||
{},
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue