1
0
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:
Pavol Rusnak 2018-11-01 15:41:00 +01:00
parent 74e1fceaea
commit 8d060a93f1
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
2 changed files with 238 additions and 234 deletions

File diff suppressed because it is too large Load Diff

View File

@ -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")