|
18 | 18 | import hdwallet |
19 | 19 | from hdwallet import cryptocurrencies |
20 | 20 |
|
| 21 | +from .defaults import BITS_DEFAULT, BITS, MNEM_ROWS_COLS, GROUP_REQUIRED_RATIO, CRYPTO_PATHS |
| 22 | +from .util import ordinal |
| 23 | + |
21 | 24 | log = logging.getLogger( __package__ ) |
22 | 25 |
|
23 | 26 | # Support for private key encryption via BIP-38 and Ethereum JSON wallet is optional; pip install slip39[wallet] |
|
46 | 49 | log.exception( message ) |
47 | 50 | paper_wallet_issues.append( message ) |
48 | 51 |
|
49 | | -from .defaults import BITS_DEFAULT, BITS, MNEM_ROWS_COLS, GROUP_REQUIRED_RATIO, CRYPTO_PATHS |
50 | | -from .util import ordinal |
51 | | - |
52 | 52 |
|
53 | 53 | RANDOM_BYTES = secrets.token_bytes |
54 | 54 |
|
55 | 55 |
|
56 | | - |
57 | 56 | def paper_wallet_available(): |
58 | 57 | """Determine if encrypted BIP-38 and Ethereum JSON Paper Wallets are available.""" |
59 | | - available = AES and scrypt and eth_account |
| 58 | + available = AES and scrypt and eth_account |
60 | 59 | if not available: |
61 | 60 | log.warning( f"Paper Wallets unavailable; perhaps run: 'python3 -m pip install slip39[gui,wallet]': {', '.join( paper_wallet_issues )}" ) |
62 | 61 | return available |
@@ -161,7 +160,7 @@ class BinanceMainnet( cryptocurrencies.Cryptocurrency ): |
161 | 160 | DEFAULT_PATH = f"m/44'/{str(COIN_TYPE)}/0'/0/0" |
162 | 161 | WIF_SECRET_KEY = 0x80 |
163 | 162 |
|
164 | | - |
| 163 | + |
165 | 164 | class Account( hdwallet.HDWallet ): |
166 | 165 |
|
167 | 166 | """Supports producing Legacy addresses for Bitcoin, and Litecoin. Doge (D...) and Ethereum (0x...) |
@@ -348,13 +347,13 @@ def wrapper( self, *args, **kwds ): |
348 | 347 | symbol = self.hdwallet._cryptocurrency.SYMBOL |
349 | 348 | try: |
350 | 349 | self.hdwallet._cryptocurrency.SYMBOL \ |
351 | | - = self.CRYPTO_LOCAL_SYMBOL.get( symbol, symbol ) |
| 350 | + = self.CRYPTO_LOCAL_SYMBOL.get( symbol, symbol ) # noqa: E126 |
352 | 351 | return method( self, *args, **kwds ) |
353 | 352 | finally: |
354 | 353 | self.hdwallet._cryptocurrency.SYMBOL \ |
355 | | - = symbol |
| 354 | + = symbol # noqa: E126 |
356 | 355 | return wrapper |
357 | | - |
| 356 | + |
358 | 357 | @substitute_symbol |
359 | 358 | def legacy_address( self ): |
360 | 359 | return self.hdwallet.p2pkh_address() |
|
0 commit comments