mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 22:38:08 +00:00
update defs/coins_details.json
This commit is contained in:
parent
74e1fceaea
commit
8d060a93f1
File diff suppressed because it is too large
Load Diff
@ -36,8 +36,11 @@ def coinmarketcap_init(api_key, refresh=None):
|
||||
|
||||
force_refresh = refresh is True
|
||||
disable_refresh = refresh is False
|
||||
try:
|
||||
try:
|
||||
mtime = os.path.getmtime(COINMAKETCAP_CACHE)
|
||||
except FileNotFoundError:
|
||||
mtime = 0
|
||||
cache_is_fresh = mtime > time.time() - 3600
|
||||
if disable_refresh or (cache_is_fresh and not force_refresh):
|
||||
print("Using cached market cap data")
|
||||
|
Loading…
Reference in New Issue
Block a user