update for MMGen Wallet v15.1.dev20

This commit is contained in:
The MMGen Project 2025-03-15 18:23:16 +00:00
commit 966c171650
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
7 changed files with 20 additions and 18 deletions

View file

@ -87,7 +87,7 @@ Code repository:
Code repository mirrors:
[Github](https://github.com/mmgen/mmgen-node-tools) |
[Gitlab](https://gitlab.com/mmgen/mmgen-node-tools) |
[Gitflic](https://gitflic.ru/project/mmgen/mmgen-node-tools)
[Codeberg](https://codeberg.org/mmgen/mmgen-node-tools)
[Keybase](https://keybase.io/mmgen) |
[Twitter](https://twitter.com/TheMMGenProject) |
[Reddit](https://www.reddit.com/user/mmgen-py) |

View file

@ -799,7 +799,7 @@ class Ticker:
from mmgen.util2 import format_elapsed_hr
fmt_func = format_elapsed_hr
else:
fmt_func = lambda t,now: time.strftime('%F %X',time.gmtime(t))
fmt_func = lambda t,now: time.strftime('%F %X', time.gmtime(t))
d = self.data
max_w = 0
@ -820,15 +820,17 @@ class Ticker:
msg(str(e))
pass
else:
t_fmt = d[row.id]['last_updated_fmt'] = fmt_func( (min(t,min_t) if min_t else t), now )
max_w = max(len(t_fmt),max_w)
t_fmt = d[row.id]['last_updated_fmt'] = fmt_func(
(min(t,min_t) if min_t else t),
now = now)
max_w = max(len(t_fmt), max_w)
self.upd_w = max_w
def init_prec(self):
exp = [(a.id, self.prices[a.id]['usd-us-dollar'].adjusted() ) for a in self.usr_col_assets]
self.uprec = { k: max(0,v+4) + cfg.add_prec for k,v in exp }
self.uwid = { k: 12 + max(0, abs(v)-6) + cfg.add_prec for k,v in exp }
exp = [(a.id, self.prices[a.id]['usd-us-dollar'].adjusted()) for a in self.usr_col_assets]
self.uprec = {k: max(0, v+4) + cfg.add_prec for k, v in exp}
self.uwid = {k: 12 + max(0, abs(v)-6) + cfg.add_prec for k, v in exp}
def get_id(self,asset):
if asset.id:

View file

@ -1 +1 @@
3.5.dev6
3.5.dev7

View file

@ -60,7 +60,7 @@ def do_output(proto,addr_data,blk_hdrs):
make_timestr( blk_hdrs[u['height']]['time'] ),
CoinTxID(u['txid']).hl(),
red(str(u['vout']).rjust(4)),
proto.coin_amt(u['amount']).fmt(color=True,iwidth=6,prec=8)
proto.coin_amt(u['amount']).fmt(6, color=True, prec=8)
))
else:
Msg(f'{indent}No balance')
@ -93,18 +93,18 @@ def do_output_tabular(proto,addr_data,blk_hdrs):
if unspents:
Msg(fs.format(
n = str(n) + ')',
a = addr.fmt(addr.view_pref, width=max_addrw, color=True),
a = addr.fmt(addr.view_pref, max_addrw, color=True),
u = red(str(len(unspents)).rjust(5)),
b = unspents[0]['height'],
t = make_timestr( blk_hdrs[unspents[0]['height']]['time'] ),
B = unspents[-1]['height'],
T = make_timestr( blk_hdrs[unspents[-1]['height']]['time'] ),
A = sum(proto.coin_amt(u['amount']) for u in unspents).fmt(color=True, iwidth=7, prec=8)
A = sum(proto.coin_amt(u['amount']) for u in unspents).fmt(7, color=True, prec=8)
))
else:
Msg(fs.format(
n = str(n) + ')',
a = addr.fmt(addr.view_pref, width=max_addrw, color=True),
a = addr.fmt(addr.view_pref, max_addrw, color=True),
u = ' -',
b = '-',
t = '',

View file

@ -87,7 +87,7 @@ if cfg.ignore_below:
ignore_below = parse_bytespec(cfg.ignore_below)
precision = (
check_int_between(cfg.precision,min_prec,max_prec,'--precision arg')
check_int_between(cfg.precision, min_prec, max_prec, desc='--precision arg')
if cfg.precision else dfl_prec )
from mmgen.term import get_terminal_size

View file

@ -171,10 +171,10 @@ async def main():
c = date(t),
d = ' P' if n > nhist else '' if n < nhist else ' E',
e = f'{bdr:8.5f}',
f = proto.coin_amt(sub,from_unit='satoshi').fmt(iwidth=2,prec=8),
g = proto.coin_amt(mined,from_unit='satoshi').fmt(iwidth=8,prec=8),
h = proto.coin_amt(total_mined,from_unit='satoshi').fmt(iwidth=8,prec=8)
) for n,sub,blk,mined,total_mined,bdr,t in gen_data())
f = proto.coin_amt(sub, from_unit='satoshi').fmt(2, prec=8),
g = proto.coin_amt(mined, from_unit='satoshi').fmt(8, prec=8),
h = proto.coin_amt(total_mined, from_unit='satoshi').fmt(8, prec=8)
) for n, sub, blk, mined, total_mined, bdr, t in gen_data())
)
if cfg.list:

View file

@ -38,7 +38,7 @@ python_requires = >=3.9
include_package_data = True
install_requires =
mmgen-wallet>=15.1.dev14
mmgen-wallet>=15.1.dev20
pyyaml
yahooquery