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,
|
t2_coins=t2_coins,
|
||||||
marketcap_usd=supported_marketcap,
|
marketcap_usd=supported_marketcap,
|
||||||
total_marketcap_usd=total_marketcap,
|
total_marketcap_usd=total_marketcap,
|
||||||
|
marketcap_supported="{:.02f} %".format(
|
||||||
|
100 * supported_marketcap / total_marketcap
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -267,9 +270,10 @@ def check_missing_data(coins):
|
|||||||
coin["hidden"] = 1
|
coin["hidden"] = 1
|
||||||
|
|
||||||
# summary of hidden coins
|
# summary of hidden coins
|
||||||
for k, coin in coins.items():
|
hidden_coins = [k for k, coin in coins.items() if coin.get("hidden")]
|
||||||
if coin.get("hidden"):
|
for key in hidden_coins:
|
||||||
LOG.debug(f"{k}: Coin is hidden")
|
del coins[key]
|
||||||
|
LOG.debug(f"{k}: Coin is hidden")
|
||||||
|
|
||||||
|
|
||||||
def apply_overrides(coins):
|
def apply_overrides(coins):
|
||||||
|
Loading…
Reference in New Issue
Block a user