eth: use local transactions module exclusively

This commit is contained in:
The MMGen Project 2019-05-20 15:35:12 +00:00
commit 1e75442bb9
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
2 changed files with 3 additions and 6 deletions

View file

@ -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]

View file

@ -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'],(