Skip to content

Commit 3b0f563

Browse files
Nostr: display balance
1 parent a145ca6 commit 3b0f563

File tree

1 file changed

+4
-0
lines changed
  • internal_filesystem/apps/com.micropythonos.nostr/assets

1 file changed

+4
-0
lines changed

internal_filesystem/apps/com.micropythonos.nostr/assets/nostr.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ def balance_updated_cb(self, sats_added=0):
166166
self.fullscreenqr.finish()
167167
balance = self.wallet.last_known_balance
168168
print(f"balance: {balance}")
169+
if balance is not None:
170+
WidgetAnimator.change_widget(self.balance_label, anim_type="interpolate", duration=5000, delay=0, begin_value=balance-sats_added, end_value=balance, display_change=self.display_balance)
171+
else:
172+
print("Not drawing balance because it's None")
169173

170174
def redraw_payments_cb(self):
171175
# this gets called from another thread (the wallet) so make sure it happens in the LVGL thread using lv.async_call():

0 commit comments

Comments
 (0)