mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-27 15:31:31 +00:00
revert commit 3863ee
This commit is contained in:
parent
c908c7e9a3
commit
cdefecc16b
1 changed files with 1 additions and 16 deletions
|
@ -23,7 +23,6 @@ from qrtextedit import QRTextEdit
|
||||||
import re
|
import re
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
from electrum import bitcoin
|
from electrum import bitcoin
|
||||||
from electrum.i18n import _
|
|
||||||
|
|
||||||
RE_ADDRESS = '[1-9A-HJ-NP-Za-km-z]{26,}'
|
RE_ADDRESS = '[1-9A-HJ-NP-Za-km-z]{26,}'
|
||||||
RE_ALIAS = '(.*?)\s*\<([1-9A-HJ-NP-Za-km-z]{26,})\>'
|
RE_ALIAS = '(.*?)\s*\<([1-9A-HJ-NP-Za-km-z]{26,})\>'
|
||||||
|
@ -115,29 +114,15 @@ class PayToEdit(QRTextEdit):
|
||||||
self.unlock_amount()
|
self.unlock_amount()
|
||||||
return
|
return
|
||||||
|
|
||||||
errors = []
|
for line in lines:
|
||||||
errtext = ""
|
|
||||||
for i, line in enumerate(lines):
|
|
||||||
try:
|
try:
|
||||||
type, to_address, amount = self.parse_address_and_amount(line)
|
type, to_address, amount = self.parse_address_and_amount(line)
|
||||||
except:
|
except:
|
||||||
x, y = line.split(',')
|
|
||||||
r = x.strip()
|
|
||||||
m = re.match('^'+RE_ALIAS+'$', r)
|
|
||||||
address = m.group(2) if m else r
|
|
||||||
errors.append((i, address))
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
outputs.append((type, to_address, amount))
|
outputs.append((type, to_address, amount))
|
||||||
total += amount
|
total += amount
|
||||||
|
|
||||||
if errors != []:
|
|
||||||
for x in errors:
|
|
||||||
errtext += "Line #" + str(x[0]+1) + ": " + x[1] + "\n"
|
|
||||||
QMessageBox.critical(None, _("Invalid Addresses"), _("ABORTING! Invalid Addresses found:") + "\n\n" + errtext)
|
|
||||||
self.clear()
|
|
||||||
return
|
|
||||||
|
|
||||||
self.outputs = outputs
|
self.outputs = outputs
|
||||||
self.payto_address = None
|
self.payto_address = None
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue