Dynamically load all balances from Safe

This commit is contained in:
2020-08-13 16:13:50 +02:00
parent 1dd63b2c7a
commit 5f90bc23bc
4 changed files with 40 additions and 20 deletions
+8 -11
View File
@@ -1,4 +1,4 @@
<table class="token-balances">
<table class="token-balances {{if this.loading 'loading'}}">
<thead>
<tr>
<th>Token</th>
@@ -7,15 +7,12 @@
</tr>
</thead>
<tbody>
<tr>
<th>ETH</th>
<td class="amount">{{fmt-crypto-currency this.communityFunds.balanceETH.balance 'ETH'}}</td>
<td class="fiat-amount">{{this.communityFunds.balanceETH.balanceUsd}} USD</td>
</tr>
<tr>
<th>WBTC</th>
<td class="amount">{{fmt-crypto-currency this.communityFunds.balanceWBTC.balance 'WBTC'}}</td>
<td class="fiat-amount">{{this.communityFunds.balanceWBTC.balanceUsd}} USD</td>
</tr>
{{#each this.balances as |balance|}}
<tr>
<th>{{balance.token.symbol}}</th>
<td class="amount">{{fmt-crypto-currency balance.balance balance.token.symbol}}</td>
<td class="fiat-amount">{{balance.balanceUsd}} USD</td>
</tr>
{{/each}}
</tbody>
</table>