QMessageBox.warning(self, _('Error'), _('No outputs'), _('OK'))
return
- for addr, x in outputs:
+ for type, addr, amount in outputs:
if addr is None:
QMessageBox.warning(self, _('Error'), _('Bitcoin Address is None'), _('OK'))
return
- if addr.startswith('OP_RETURN:'):
+ if type == 'op_return':
continue
- if not bitcoin.is_address(addr):
+ if type == 'address' and not bitcoin.is_address(addr):
QMessageBox.warning(self, _('Error'), _('Invalid Bitcoin Address'), _('OK'))
return
- if x is None:
+ if amount is None:
QMessageBox.warning(self, _('Error'), _('Invalid Amount'), _('OK'))
return
- amount = sum(map(lambda x:x[1], outputs))
+ amount = sum(map(lambda x:x[2], outputs))
fee = self.fee_e.get_amount()
if fee is None:
confirm_amount = self.config.get('confirm_amount', 100000000)
if amount >= confirm_amount:
- o = '\n'.join(map(lambda x:x[0], outputs))
+ o = '\n'.join(map(lambda x:x[1], outputs))
if not self.question(_("send %(amount)s to %(address)s?")%{ 'amount' : self.format_amount(amount) + ' '+ self.base_unit(), 'address' : o}):
return
self.wallet.create_pending_account(name, password)
self.update_address_tab()
- self.tabs.setCurrentIndex(2)
+ self.tabs.setCurrentIndex(3)
pubkey_e = QLineEdit()
if address:
- pubkey = self.wallet.getpubkeys(address)[0]
+ pubkey = self.wallet.get_public_keys(address)[0]
pubkey_e.setText(pubkey)
layout.addWidget(QLabel(_('Public key')), 2, 0)
layout.addWidget(pubkey_e, 2, 1)
try:
for position, row in enumerate(csvReader):
address = row[0]
- if not is_valid(address):
+ if not is_address(address):
errors.append((position, address))
continue
amount = Decimal(row[1])
amount = int(100000000*amount)
- outputs.append((address, amount))
+ outputs.append(('address', address, amount))
except (ValueError, IOError, os.error), reason:
QMessageBox.critical(None, _("Unable to read file or no transaction found"), _("Electrum was unable to open your transaction file") + "\n" + str(reason))
return