1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-18 12:28:09 +00:00

stellar: get public key removed

This commit is contained in:
Tomas Susanka 2018-08-21 14:25:15 +02:00
parent db71e919b7
commit 4305c1da1b
2 changed files with 1 additions and 28 deletions

View File

@ -1,8 +1,4 @@
from trezor.messages.MessageType import ( from trezor.messages.MessageType import StellarGetAddress, StellarSignTx
StellarGetAddress,
StellarGetPublicKey,
StellarSignTx,
)
from trezor.wire import protobuf_workflow, register from trezor.wire import protobuf_workflow, register
@ -12,12 +8,6 @@ def dispatch_StellarGetAddress(*args, **kwargs):
return get_address(*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): def dispatch_StellarSignTx(*args, **kwargs):
from .sign_tx import sign_tx from .sign_tx import sign_tx
@ -26,5 +16,4 @@ def dispatch_StellarSignTx(*args, **kwargs):
def boot(): def boot():
register(StellarGetAddress, protobuf_workflow, dispatch_StellarGetAddress) register(StellarGetAddress, protobuf_workflow, dispatch_StellarGetAddress)
register(StellarGetPublicKey, protobuf_workflow, dispatch_StellarGetPublicKey)
register(StellarSignTx, protobuf_workflow, dispatch_StellarSignTx) register(StellarSignTx, protobuf_workflow, dispatch_StellarSignTx)

View File

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