1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-07-01 04:12:37 +00:00

common/tools: rework trezor url matching in coins_details.py

This commit is contained in:
Pavol Rusnak 2019-07-26 13:20:11 +02:00
parent 0246579779
commit ae3963a807
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -38,10 +38,11 @@ WALLETS_ETH_NATIVE = WALLETS_ETH_3RDPARTY.copy()
WALLETS_ETH_NATIVE.update(WALLET_TREZOR_NEXT) WALLETS_ETH_NATIVE.update(WALLET_TREZOR_NEXT)
TREZORIO_KNOWN_URLS = ( TREZOR_KNOWN_URLS = (
"https://wallet.trezor.io", "https://wallet.trezor.io",
"https://beta-wallet.trezor.io/next/", "https://beta-wallet.trezor.io/next/",
"https://trezor.io/stellar/", "https://trezor.io/stellar/",
"https://omnitrezor.com/",
) )
@ -330,11 +331,8 @@ def check_missing_data(coins):
LOG.warning(f"{k}: Bad wallet entry") LOG.warning(f"{k}: Bad wallet entry")
hide = True hide = True
continue continue
if "trezor" in name.lower() and url not in TREZORIO_KNOWN_URLS: if "trezor" in name.lower() and url not in TREZOR_KNOWN_URLS:
LOG.warning(f"{k}: Strange URL for Trezor Wallet") LOG.warning(f"{k}: Strange URL for Trezor Wallet")
hide = True
if "trezor.io" in url.lower() and url not in TREZORIO_KNOWN_URLS:
LOG.warning(f"{k}: Unexpected trezor.io URL: {url}")
if coin["t1_enabled"] == "no" and coin["t2_enabled"] == "no": if coin["t1_enabled"] == "no" and coin["t2_enabled"] == "no":
LOG.info(f"{k}: Coin not enabled on either device") LOG.info(f"{k}: Coin not enabled on either device")