mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-03 12:00:59 +00:00
coins_details: drop hidden coins from listing, regenerate
also precalculate percent market cap supported
This commit is contained in:
parent
9a8d01a891
commit
7d618036ab
File diff suppressed because it is too large
Load Diff
@ -115,6 +115,9 @@ def summary(coins, api_key):
|
||||
t2_coins=t2_coins,
|
||||
marketcap_usd=supported_marketcap,
|
||||
total_marketcap_usd=total_marketcap,
|
||||
marketcap_supported="{:.02f} %".format(
|
||||
100 * supported_marketcap / total_marketcap
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
@ -267,8 +270,9 @@ def check_missing_data(coins):
|
||||
coin["hidden"] = 1
|
||||
|
||||
# summary of hidden coins
|
||||
for k, coin in coins.items():
|
||||
if coin.get("hidden"):
|
||||
hidden_coins = [k for k, coin in coins.items() if coin.get("hidden")]
|
||||
for key in hidden_coins:
|
||||
del coins[key]
|
||||
LOG.debug(f"{k}: Coin is hidden")
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user