remove remaining instances of op_return type
This commit is contained in:
parent
afec848151
commit
8863b6f294
|
@ -1081,13 +1081,11 @@ class ElectrumWindow(QMainWindow):
|
||||||
QMessageBox.warning(self, _('Error'), _('No outputs'), _('OK'))
|
QMessageBox.warning(self, _('Error'), _('No outputs'), _('OK'))
|
||||||
return
|
return
|
||||||
|
|
||||||
for type, addr, amount in outputs:
|
for _type, addr, amount in outputs:
|
||||||
if addr is None:
|
if addr is None:
|
||||||
QMessageBox.warning(self, _('Error'), _('Bitcoin Address is None'), _('OK'))
|
QMessageBox.warning(self, _('Error'), _('Bitcoin Address is None'), _('OK'))
|
||||||
return
|
return
|
||||||
if type == 'op_return':
|
if _type == 'address' and not bitcoin.is_address(addr):
|
||||||
continue
|
|
||||||
if type == 'address' and not bitcoin.is_address(addr):
|
|
||||||
QMessageBox.warning(self, _('Error'), _('Invalid Bitcoin Address'), _('OK'))
|
QMessageBox.warning(self, _('Error'), _('Invalid Bitcoin Address'), _('OK'))
|
||||||
return
|
return
|
||||||
if amount is None:
|
if amount is None:
|
||||||
|
|
|
@ -419,11 +419,6 @@ def get_address_from_output_script(bytes):
|
||||||
if match_decoded(decoded, match):
|
if match_decoded(decoded, match):
|
||||||
return 'address', hash_160_to_bc_address(decoded[1][1],5)
|
return 'address', hash_160_to_bc_address(decoded[1][1],5)
|
||||||
|
|
||||||
# OP_RETURN
|
|
||||||
match = [ opcodes.OP_RETURN, opcodes.OP_PUSHDATA4 ]
|
|
||||||
if match_decoded(decoded, match):
|
|
||||||
return 'op_return', decoded[1][1]
|
|
||||||
|
|
||||||
return 'script', bytes
|
return 'script', bytes
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -685,9 +685,6 @@ class Abstract_Wallet(object):
|
||||||
def make_unsigned_transaction(self, outputs, fixed_fee=None, change_addr=None, domain=None, coins=None ):
|
def make_unsigned_transaction(self, outputs, fixed_fee=None, change_addr=None, domain=None, coins=None ):
|
||||||
# check outputs
|
# check outputs
|
||||||
for type, data, value in outputs:
|
for type, data, value in outputs:
|
||||||
if type == 'op_return':
|
|
||||||
assert len(data) < 41, "string too long"
|
|
||||||
#assert value == 0
|
|
||||||
if type == 'address':
|
if type == 'address':
|
||||||
assert is_address(data), "Address " + data + " is invalid!"
|
assert is_address(data), "Address " + data + " is invalid!"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue