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:
@@ -19,7 +19,13 @@ export default class ExchangeRatesService extends Service {
|
||||
@tracked btceur = 0;
|
||||
@tracked btcusd = 0;
|
||||
|
||||
get exchangeRatesLoaded () {
|
||||
return (this.btceur !== 0) && (this.btcusd !== 0);
|
||||
}
|
||||
|
||||
async fetchRates (source='bitstamp') {
|
||||
if (this.exchangeRatesLoaded) return;
|
||||
|
||||
switch(source) {
|
||||
case 'bitstamp':
|
||||
this.btceur = await fetchFromBitstamp('btceur');
|
||||
|
||||
Reference in New Issue
Block a user