Fix issues loading balance info if lnd is partially started

This commit is contained in:
Taylor Helsper 2021-03-15 23:25:19 -05:00
parent f09a8f126c
commit 9a43686431
2 changed files with 7 additions and 1 deletions

View File

@ -254,6 +254,7 @@
<br/> <br/>
<div class="main_header">Balances</div> <div class="main_header">Balances</div>
<div class="app_tile_row"> <div class="app_tile_row">
{% if lnd_deposit_address != "ERROR" %}
<div class="info_tile" style="min-width: 280px;"> <div class="info_tile" style="min-width: 280px;">
<div class="info_tile_header">Deposit Address</div> <div class="info_tile_header">Deposit Address</div>
<div class="info_tile_contents"> <div class="info_tile_contents">
@ -264,6 +265,7 @@
<button id="gen_new_address_button" class="ui-button ui-widget ui-corner-all mynode_button_small">Generate New Address</button> <button id="gen_new_address_button" class="ui-button ui-widget ui-corner-all mynode_button_small">Generate New Address</button>
</div> </div>
</div> </div>
{% endif %}
<div class="info_tile"> <div class="info_tile">
<div class="info_tile_header">Balances</div> <div class="info_tile_header">Balances</div>

View File

@ -60,4 +60,8 @@ def get_data(key):
# UI Format Functions # UI Format Functions
#================================== #==================================
def format_sat_amount(amount): def format_sat_amount(amount):
return "{:,}".format(int(amount)) try:
r = "{:,}".format(int(amount))
except:
r = amount
return r