diff --git a/eth_account/signers/ledger.py b/eth_account/signers/ledger.py index 10c1bac6..9ae1afc3 100644 --- a/eth_account/signers/ledger.py +++ b/eth_account/signers/ledger.py @@ -1,40 +1,32 @@ -import hid import itertools import logging import struct import time import eth_utils -import rlp - +from eth_utils import ( + to_bytes, + to_hex, +) +from eth_utils.curried import ( + keccak, +) from hexbytes import HexBytes - +import rlp from eth_account import ( Account, ) - from eth_account.datastructures import ( AttributeDict, ) - -from eth_account.signers.base import ( - BaseAccount, -) - from eth_account.internal.transactions import ( encode_transaction, serializable_unsigned_transaction_from_dict, ) - -from eth_utils import ( - to_bytes, - to_hex, -) - -from eth_utils.curried import ( - keccak, +from eth_account.signers.base import ( + BaseAccount, ) - +import hid ETH_DERIVATION_PATH_PREFIX = "m/44'/60'/0'/" diff --git a/tests/integration/ledger/test_ledger.py b/tests/integration/ledger/test_ledger.py index c0f66bb3..8434e597 100644 --- a/tests/integration/ledger/test_ledger.py +++ b/tests/integration/ledger/test_ledger.py @@ -2,6 +2,10 @@ import pytest +from hexbytes import ( + HexBytes, +) + from eth_account import ( Account, ) @@ -10,11 +14,6 @@ LedgerAccount, ) -from hexbytes import ( - HexBytes, -) - - # Not a fixture because it does not support multiple LedgerAccount ledger = LedgerAccount()