fixed refresh and some minor bug about dust amounts and empty wallet

This commit is contained in:
2026-03-05 10:46:38 -04:00
parent c5ad5a61bb
commit ef0ab56de4
4 changed files with 127 additions and 76 deletions

View File

@@ -470,7 +470,7 @@ class Will:
Will.reflect_to_children(wc)
def check_amounts(heirs, willexecutors, all_utxos, timestamp_to_check, dust):
fixed_heirs, fixed_amount, perc_heirs, perc_amount = (
fixed_heirs, fixed_amount, perc_heirs, perc_amount,fixed_amount_with_dust = (
heirs.fixed_percent_lists_amount(timestamp_to_check, dust, reverse=True)
)
wallet_balance = 0
@@ -620,9 +620,9 @@ class Will:
heirs_found[wheir] = count + 1
else:
_logger.debug(
"heir not present transaction is not valid:", wid, w
f"heir not present transaction is not valid:{wheir} {wid}, {w}"
)
continue
if willexecutor := w.we:
count = willexecutors_found.get(willexecutor["url"], 0)
if Util.cmp_willexecutor(
@@ -634,6 +634,7 @@ class Will:
no_willexecutor += 1
count_heirs = 0
for h in heirs:
if Util.parse_locktime_string(heirs[h][2]) >= check_date:
count_heirs += 1
if not h in heirs_found:
@@ -643,7 +644,6 @@ class Will:
raise NoHeirsException("there are not valid heirs")
if self_willexecutor and no_willexecutor == 0:
raise NoWillExecutorNotPresent("Backup tx")
for url, we in willexecutors.items():
if Willexecutors.is_selected(we):
if not url in willexecutors_found: