Skip to content

Commit

Permalink
xmr: isort, black, flake8 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ph4r05 committed Sep 27, 2018
1 parent 14265eb commit 8f7a778
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/apps/monero/protocol/signing/step_04_input_vini.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from apps.monero.layout import confirms
from apps.monero.protocol import hmac_encryption_keys
from apps.monero.xmr import common, crypto, monero
from apps.monero.xmr import common, crypto


async def input_vini(
Expand Down
4 changes: 1 addition & 3 deletions src/apps/monero/protocol/signing/step_07_all_out1_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,7 @@ async def all_out1_set(state: State):

# Initializes RCTsig structure (fee, tx prefix hash, type)
rv_pb = MoneroRingCtSig(
txn_fee=state.fee,
message=state.tx_prefix_hash,
rv_type=state.get_rct_type(),
txn_fee=state.fee, message=state.tx_prefix_hash, rv_type=state.get_rct_type()
)

return MoneroTransactionAllOutSetAck(
Expand Down
8 changes: 4 additions & 4 deletions src/apps/monero/protocol/signing/step_10_sign_final.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

import gc

from trezor.messages.MoneroTransactionFinalAck import MoneroTransactionFinalAck

from .state import State

from apps.monero.controller import misc
from apps.monero.layout import confirms
from apps.monero.protocol import hmac_encryption_keys
from apps.monero.xmr import crypto
from apps.monero.xmr.enc import chacha_poly
from apps.monero.protocol import hmac_encryption_keys
from trezor.messages.MoneroTransactionFinalAck import MoneroTransactionFinalAck

from apps.monero.layout import confirms


async def final_msg(state: State):
Expand Down
13 changes: 9 additions & 4 deletions src/apps/monero/protocol_lite/lite.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

from .consts import *

from apps.monero.controller import misc
from apps.monero.layout import confirms
from apps.monero.xmr import common, crypto, monero
from apps.monero.xmr.enc import aescbc
Expand Down Expand Up @@ -568,11 +567,17 @@ async def mlsag_prehash_update(self):
return SW_OK

async def _req_dst(self, Aout, Bout, amount, is_sub=False):
from trezor.messages.MoneroAccountPublicAddress import MoneroAccountPublicAddress
from trezor.messages.MoneroTransactionDestinationEntry import MoneroTransactionDestinationEntry
from trezor.messages.MoneroAccountPublicAddress import (
MoneroAccountPublicAddress
)
from trezor.messages.MoneroTransactionDestinationEntry import (
MoneroTransactionDestinationEntry
)

addr = MoneroAccountPublicAddress(view_public_key=Aout, spend_public_key=Bout)
out = MoneroTransactionDestinationEntry(addr=addr, amount=amount, is_subaddress=is_sub)
out = MoneroTransactionDestinationEntry(
addr=addr, amount=amount, is_subaddress=is_sub
)
await self.iface.confirm_out(out, False, self.creds, self.ctx)

async def mlsag_prehash_finalize(self):
Expand Down
1 change: 1 addition & 0 deletions src/apps/monero/sign_tx.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from trezor import log, utils
from trezor.messages import MessageType

from apps.monero.protocol.signing.state import State


Expand Down

0 comments on commit 8f7a778

Please sign in to comment.