Browse Source

transaction: helpful error msg if user tries to load old partial tx

patch-1
SomberNight 5 years ago
parent
commit
cd49839bc0
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 5
      electrum/transaction.py

5
electrum/transaction.py

@ -913,7 +913,10 @@ def tx_from_any(raw: Union[str, bytes]) -> Union['PartialTransaction', 'Transact
try:
return PartialTransaction.from_raw_psbt(raw)
except BadHeaderMagic:
pass
if raw[:10] == b'EPTF\xff'.hex():
raise Exception("Partial transactions generated with old Electrum versions "
"(< 4.0) are no longer supported. Please upgrade Electrum on "
"the other machine where this transaction was created.")
tx = Transaction(raw)
tx.deserialize()
return tx

Loading…
Cancel
Save