From 4305c1da1bd89582ce4d05def815e6c5a182e35f Mon Sep 17 00:00:00 2001 From: Tomas Susanka Date: Tue, 21 Aug 2018 14:25:15 +0200 Subject: [PATCH] stellar: get public key removed --- src/apps/stellar/__init__.py | 13 +------------ src/apps/stellar/get_public_key.py | 16 ---------------- 2 files changed, 1 insertion(+), 28 deletions(-) delete mode 100644 src/apps/stellar/get_public_key.py diff --git a/src/apps/stellar/__init__.py b/src/apps/stellar/__init__.py index 4ad07eda3..5d48614bc 100644 --- a/src/apps/stellar/__init__.py +++ b/src/apps/stellar/__init__.py @@ -1,8 +1,4 @@ -from trezor.messages.MessageType import ( - StellarGetAddress, - StellarGetPublicKey, - StellarSignTx, -) +from trezor.messages.MessageType import StellarGetAddress, StellarSignTx from trezor.wire import protobuf_workflow, register @@ -12,12 +8,6 @@ def dispatch_StellarGetAddress(*args, **kwargs): return get_address(*args, **kwargs) -def dispatch_StellarGetPublicKey(*args, **kwargs): - from .get_public_key import get_public_key - - return get_public_key(*args, **kwargs) - - def dispatch_StellarSignTx(*args, **kwargs): from .sign_tx import sign_tx @@ -26,5 +16,4 @@ def dispatch_StellarSignTx(*args, **kwargs): def boot(): register(StellarGetAddress, protobuf_workflow, dispatch_StellarGetAddress) - register(StellarGetPublicKey, protobuf_workflow, dispatch_StellarGetPublicKey) register(StellarSignTx, protobuf_workflow, dispatch_StellarSignTx) diff --git a/src/apps/stellar/get_public_key.py b/src/apps/stellar/get_public_key.py deleted file mode 100644 index fce9e7380..000000000 --- a/src/apps/stellar/get_public_key.py +++ /dev/null @@ -1,16 +0,0 @@ -from trezor.messages.StellarGetPublicKey import StellarGetPublicKey -from trezor.messages.StellarPublicKey import StellarPublicKey - -from apps.common import seed -from apps.common.show import show_pubkey -from apps.stellar import helpers - - -async def get_public_key(ctx, msg: StellarGetPublicKey): - node = await seed.derive_node(ctx, msg.address_n, helpers.STELLAR_CURVE) - pubkey = seed.remove_ed25519_prefix(node.public_key()) - - if msg.show_display: - await show_pubkey(ctx, pubkey) - - return StellarPublicKey(public_key=pubkey)