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

chore(core): monero: drop extraneous async/await

This commit is contained in:
Martin Milata 2021-01-08 00:29:16 +01:00 committed by matejcik
parent 1e6259a476
commit fa2e672f98
3 changed files with 4 additions and 4 deletions

View File

@ -135,7 +135,7 @@ async def sign_tx_dispatch(state, msg, keychain):
elif msg.MESSAGE_WIRE_TYPE == MessageType.MoneroTransactionFinalRequest: elif msg.MESSAGE_WIRE_TYPE == MessageType.MoneroTransactionFinalRequest:
from apps.monero.signing import step_10_sign_final from apps.monero.signing import step_10_sign_final
return await step_10_sign_final.final_msg(state), None return step_10_sign_final.final_msg(state), None
else: else:
raise wire.DataError("Unknown message") raise wire.DataError("Unknown message")

View File

@ -45,7 +45,7 @@ async def set_output(
state.mem_trace(1, True) state.mem_trace(1, True)
dst_entr = await _validate(state, dst_entr, dst_entr_hmac, is_offloaded_bp) dst_entr = _validate(state, dst_entr, dst_entr_hmac, is_offloaded_bp)
state.mem_trace(2, True) state.mem_trace(2, True)
if not state.is_processing_offloaded: if not state.is_processing_offloaded:
@ -121,7 +121,7 @@ async def set_output(
) )
async def _validate( def _validate(
state: State, state: State,
dst_entr: MoneroTransactionDestinationEntry, dst_entr: MoneroTransactionDestinationEntry,
dst_entr_hmac: bytes, dst_entr_hmac: bytes,

View File

@ -21,7 +21,7 @@ if False:
from apps.monero.xmr.types import Sc25519 from apps.monero.xmr.types import Sc25519
async def final_msg(state: State) -> MoneroTransactionFinalAck: def final_msg(state: State) -> MoneroTransactionFinalAck:
if state.last_step != state.STEP_SIGN: if state.last_step != state.STEP_SIGN:
raise ValueError("Invalid state transition") raise ValueError("Invalid state transition")
if state.current_input_index != state.input_count - 1: if state.current_input_index != state.input_count - 1: