From 1e75442bb9cde8f44bdf6628d98eba59e4b85610 Mon Sep 17 00:00:00 2001 From: MMGen Date: Mon, 20 May 2019 15:35:12 +0000 Subject: [PATCH] eth: use local transactions module exclusively --- mmgen/altcoins/eth/contract.py | 3 +-- mmgen/altcoins/eth/tx.py | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/mmgen/altcoins/eth/contract.py b/mmgen/altcoins/eth/contract.py index 9168e6e0..6fb63d54 100755 --- a/mmgen/altcoins/eth/contract.py +++ b/mmgen/altcoins/eth/contract.py @@ -109,8 +109,7 @@ class Token(MMGenObject): # ERC20 def txsign(self,tx_in,key,from_addr,chain_id=None): - try: from ethereum.transactions import Transaction - except: from .pyethereum.transactions import Transaction + from .pyethereum.transactions import Transaction if chain_id is None: chain_id_method = ('parity_chainId','eth_chainId')['eth_chainId' in g.rpch.caps] diff --git a/mmgen/altcoins/eth/tx.py b/mmgen/altcoins/eth/tx.py index a9618667..51d774f6 100755 --- a/mmgen/altcoins/eth/tx.py +++ b/mmgen/altcoins/eth/tx.py @@ -91,8 +91,7 @@ class EthereumMMGenTX(MMGenTX): def check_txfile_hex_data(self): if self.check_sigs(): - try: from ethereum.transactions import Transaction - except: from .pyethereum.transactions import Transaction + from .pyethereum.transactions import Transaction from . import rlp etx = rlp.decode(bytes.fromhex(self.hex),Transaction) @@ -287,8 +286,7 @@ class EthereumMMGenTX(MMGenTX): 'nonce': d['nonce'], 'data': bytes.fromhex(d['data'])} - try: from ethereum.transactions import Transaction - except: from .pyethereum.transactions import Transaction + from .pyethereum.transactions import Transaction etx = Transaction(**d_in).sign(wif,d['chainId']) assert etx.sender.hex() == d['from'],(