1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-11 16:00:57 +00:00

core: add equality function to coininfo

This commit is contained in:
Pavol Rusnak 2019-05-22 16:59:06 +02:00
parent b31092a874
commit a99ccbc4d2
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -63,6 +63,11 @@ class CoinInfo:
self.sign_hash_double = True
self.script_hash = sha256_ripemd160_digest
def __eq__(self, other):
if not isinstance(other, CoinInfo):
return NotImplemented
return self.coin_name == other.coin_name
# fmt: off
def by_name(name: str) -> CoinInfo: