mirror of
https://github.com/alexbosworth/balanceofsatoshis.git
synced 2026-08-13 12:33:37 +02:00
add ignore rebalances below flag
Signed-off-by: Nitesh Balusu <niteshbalusu@icloud.com>
This commit is contained in:
parent
8bba006f50
commit
7ea656c635
4 changed files with 8 additions and 0 deletions
2
bos
2
bos
|
|
@ -1895,6 +1895,7 @@ prog
|
|||
.option('--budget <amount>', 'Spending amount to allow', INT, Number())
|
||||
.option('--connect <connect_code>', 'Connection code from /connect')
|
||||
.option('--ignore-forwards-below <amount>', 'Ignore forwards of value', INT)
|
||||
.option('--ignore-rebalances-below <amount>', 'Ignore rebalances of value', INT)
|
||||
.option('--node <node_name>', 'Node to connect to Telegram', REPEATABLE)
|
||||
.option('--reset-api-key', 'Reset the Telegram API key')
|
||||
.option('--use-proxy <path>', 'Proxy agent to connect to Telegram')
|
||||
|
|
@ -1915,6 +1916,7 @@ prog
|
|||
id: options.connect,
|
||||
is_small_units: options.useSmallUnits || undefined,
|
||||
min_forward_tokens: options.ignoreForwardsBelow || undefined,
|
||||
min_rebalance_tokens: options.ignoreRebalancesBelow || undefined,
|
||||
nodes: flatten([options.node].filter(n => !!n)),
|
||||
payments: {limit: options.budget},
|
||||
proxy: options.useProxy || undefined,
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ const smallUnitsType = 'full';
|
|||
is_small_units: <Formatting Should Use Small Units Bool>
|
||||
logger: <Winston Logger Object>
|
||||
[min_forward_tokens]: <Minimum Forward Tokens Number>
|
||||
[min_rebalance_tokens]: <Minimum Rebalance Tokens Number>
|
||||
[nodes]: [<Node Name String>]
|
||||
payments: {
|
||||
[limit]: <Total Spendable Budget Tokens Limit Number>
|
||||
|
|
@ -125,6 +126,7 @@ module.exports = (args, cbk) => {
|
|||
id: Number(args.id),
|
||||
key: getBot.key,
|
||||
min_forward_tokens: args.min_forward_tokens,
|
||||
min_rebalance_tokens: args.min_rebalance_tokens,
|
||||
logger: args.logger,
|
||||
nodes: args.nodes,
|
||||
payments_limit: limit || defaultPaymentsBudget,
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ const {isArray} = Array;
|
|||
[id]: <Authorized User Id Number>
|
||||
key: <Telegram Bot API Key String>
|
||||
[min_forward_tokens]: <Minimum Forward Tokens To Notify Number>
|
||||
[min_rebalance_tokens]: <Minimum Rebalance Tokens To Notify Number>
|
||||
logger: <Winston Logger Object>
|
||||
nodes: [<Node Name String>]
|
||||
payments_limit: <Total Spendable Budget Tokens Limit Number>
|
||||
|
|
@ -96,6 +97,7 @@ module.exports = (args, cbk) => {
|
|||
id: args.id,
|
||||
key: args.key,
|
||||
min_forward_tokens: args.min_forward_tokens,
|
||||
min_rebalance_tokens: args.min_rebalance_tokens,
|
||||
lnds: getLnds.lnds,
|
||||
logger: args.logger,
|
||||
nodes: args.nodes,
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ const sanitize = n => (n || '').replace(/_/g, '\\_').replace(/[*~`]/g, '');
|
|||
[id]: <Authorized User Id Number>
|
||||
key: <Telegram API Key String>
|
||||
[min_forward_tokens]: <Minimum Forward Tokens To Notify Number>
|
||||
[min_rebalance_tokens]: <Minimum Rebalance Tokens To Notify Number>
|
||||
lnds: [<Authenticated LND API Object>]
|
||||
nodes: [<Saved Nodes String>]
|
||||
logger: <Winston Logger Object>
|
||||
|
|
@ -750,6 +751,7 @@ module.exports = (args, cbk) => {
|
|||
},
|
||||
key: node.public_key,
|
||||
lnd: node.lnd,
|
||||
min_rebalance_tokens: args.min_rebalance_tokens,
|
||||
nodes: getNodes,
|
||||
quiz: ({answers, correct, question}) => {
|
||||
return args.bot.api.sendQuiz(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue