Skip to content

Commit 6047868

Browse files
committed
mypy fix: var types
1 parent c3913bc commit 6047868

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

coldcore

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2834,9 +2834,9 @@ def _prepare_send(
28342834
psbtinfo = info
28352835
tx = info["tx"]
28362836
outs = tx["vout"]
2837-
total_in_amt = 0
2838-
total_out_amt = 0
2839-
change = 0
2837+
total_in_amt = 0.0
2838+
total_out_amt = 0.0
2839+
change = 0.0
28402840

28412841
# Add up total input amount
28422842
for i in psbtinfo["inputs"]:
@@ -2876,10 +2876,10 @@ def _prepare_send(
28762876
except Exception:
28772877
# TODO handle this
28782878
raise
2879-
amt = bold(green(f"{o['value']} BTC"))
2879+
display_amt = bold(green(f"{o['value']} BTC"))
28802880
yours = addr_info["ismine"] or addr_info["iswatchonly"]
28812881
yours_str = " (your address)" if yours else ""
2882-
F.blank(f" -> {bold(addr)} ({amt}){yours_str}")
2882+
F.blank(f" -> {bold(addr)} ({display_amt}){yours_str}")
28832883

28842884
F.p()
28852885
F.done(f"wrote PSBT to {filename} - sign with coldcard")

src/coldcore/main.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -923,9 +923,9 @@ def _prepare_send(
923923
psbtinfo = info
924924
tx = info["tx"]
925925
outs = tx["vout"]
926-
total_in_amt = 0
927-
total_out_amt = 0
928-
change = 0
926+
total_in_amt = 0.0
927+
total_out_amt = 0.0
928+
change = 0.0
929929

930930
# Add up total input amount
931931
for i in psbtinfo["inputs"]:
@@ -965,10 +965,10 @@ def _prepare_send(
965965
except Exception:
966966
# TODO handle this
967967
raise
968-
amt = bold(green(f"{o['value']} BTC"))
968+
display_amt = bold(green(f"{o['value']} BTC"))
969969
yours = addr_info["ismine"] or addr_info["iswatchonly"]
970970
yours_str = " (your address)" if yours else ""
971-
F.blank(f" -> {bold(addr)} ({amt}){yours_str}")
971+
F.blank(f" -> {bold(addr)} ({display_amt}){yours_str}")
972972

973973
F.p()
974974
F.done(f"wrote PSBT to {filename} - sign with coldcard")

0 commit comments

Comments
 (0)