Use new balance APIs from akkounts

* Use sats integer values instead of floats
* Add lightning Network account balance
* Use icons and titles/descriptions to discern between balance types
* Use more flexible config for balances (to add e.g. RBTC or BTC ecash
  later)
This commit is contained in:
2024-01-12 14:48:59 +03:00
parent 26f2f2afe9
commit dbedf1dbe8
9 changed files with 82 additions and 18 deletions
+12 -4
View File
@@ -7,11 +7,19 @@
</tr>
</thead>
<tbody>
{{#each this.balances as |balance|}}
{{#each this.balancesSorted as |balance|}}
<tr>
<th>{{balance.token.symbol}}</th>
<td class="amount">{{balance.confirmed_balance}}</td>
<td class="fiat-amount">~{{balance.balanceUSD}} USD</td>
<th>
<img src={{balance.token.icon}}
alt={{balance.token.description}}
title={{balance.token.description}} />
</th>
<td class="amount">
{{fmt-number balance.confirmed_balance}} <span class="unit">sats</span>
</td>
<td class="fiat-amount">
~{{balance.balanceUSD}} USD
</td>
</tr>
{{/each}}
</tbody>