diff --git a/src/apps/wallet/sign_identity.py b/src/apps/wallet/sign_identity.py index b915d550ae..e037bddbc6 100644 --- a/src/apps/wallet/sign_identity.py +++ b/src/apps/wallet/sign_identity.py @@ -2,7 +2,7 @@ from trezor import ui from trezor.crypto.hashlib import sha256 from trezor.messages.SignedIdentity import SignedIdentity from ustruct import pack, unpack -from trezor.utils import chunks +from trezor.utils import chunks, serialize_identity from apps.common.confirm import require_confirm from trezor.ui.text import Text @@ -51,21 +51,6 @@ async def require_confirm_sign_identity(ctx, identity, challenge_visual): await require_confirm(ctx, content) -def serialize_identity(identity): - s = '' - if identity.proto: - s += identity.proto + '://' - if identity.user: - s += identity.user + '@' - if identity.host: - s += identity.host - if identity.port: - s += ':' + identity.port - if identity.path: - s += identity.path - return s - - def get_identity_path(identity: str, index: int): identity_hash = sha256(pack('