fix alias plugin (set url)
authorthomasv <thomasv@gitorious>
Fri, 12 Apr 2013 11:05:52 +0000 (13:05 +0200)
committerthomasv <thomasv@gitorious>
Fri, 12 Apr 2013 11:05:52 +0000 (13:05 +0200)
plugins/aliases.py

index c44df3f..e67f1d6 100644 (file)
@@ -11,6 +11,7 @@ from electrum_gui.qrcodewidget import QRCodeWidget
 from electrum_gui import bmp, pyqrnative
 from electrum_gui.i18n import _
 
+from electrum import util
 
 ALIAS_REGEXP = '^(|([\w\-\.]+)@)((\w[\w\-]+\.)+[\w\-]+)$'    
 
@@ -145,12 +146,12 @@ class Plugin(BasePlugin):
                 show_message('Warning: the URI contains a bad signature.\nThe identity of the recipient cannot be verified.')
                 address = amount = label = identity = message = ''
 
-        if re.match('^(|([\w\-\.]+)@)((\w[\w\-]+\.)+[\w\-]+)$', address):
-            payto_address = get_alias(address, True, show_message, question)
+        if re.match('^(|([\w\-\.]+)@)((\w[\w\-]+\.)+[\w\-]+)$', payto):
+            payto_address = get_alias(payto, True, show_message, question)
             if payto_address:
-                address = address + ' <' + payto_address + '>'
+                payto += ' <' + payto_address + '>'
 
-        return address, amount, label, message, signature, identity, url
+        return payto, amount, label, message, signature, identity, url