Browse Source

eth: use local transactions module exclusively

MMGen 5 years ago
parent
commit
1e75442bb9
2 changed files with 3 additions and 6 deletions
  1. 1 2
      mmgen/altcoins/eth/contract.py
  2. 2 4
      mmgen/altcoins/eth/tx.py

+ 1 - 2
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]

+ 2 - 4
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'],(