This commit is contained in:
ThomasV 2012-02-06 23:45:21 +01:00
parent d7132e5e9a
commit 3c3e18056f
2 changed files with 43 additions and 40 deletions

View File

@ -764,7 +764,12 @@ class BitcoinGUI:
def set_send_tab(self, payto, amount, message, label, identity, signature, cmd):
if signature:
if re.match('^(|([\w\-\.]+)@)((\w[\w\-]+\.)+[\w\-]+)$', identity):
signing_address = self.get_alias(identity, interactive = True)
elif self.wallet.is_valid(identity):
signing_address = identity
else:
signing_address = None
if not signing_address:
return
try:
@ -827,8 +832,8 @@ class BitcoinGUI:
if auth_name is None:
a = self.wallet.aliases.get(alias)
if not a:
if interactive and self.question( "Warning: the alias is self-signed. Do you want to trust address %s ?"%to_address ):
self.wallet.aliases[r] = signing_address
if interactive and self.question( "Warning: the alias '%s' is self-signed. Do you want to trust address %s ?"%(alias,signing_address) ):
self.wallet.aliases[alias] = signing_address
else:
target = None
else:

View File

@ -734,9 +734,7 @@ class Wallet:
def read_alias(self, alias):
# this might not be the right place for this function.
import urllib
if self.is_valid(alias):
return alias
else:
m1 = re.match('([\w\-\.]+)@((\w[\w\-]+\.)+[\w\-]+)', alias)
m2 = re.match('((\w[\w\-]+\.)+[\w\-]+)', alias)
if m1: