fix #788
This commit is contained in:
parent
1e346404dd
commit
816495609f
|
@ -24,6 +24,7 @@ from electrum_gui.qt import HelpButton, EnterButton
|
||||||
class Plugin(BasePlugin):
|
class Plugin(BasePlugin):
|
||||||
|
|
||||||
target_host = 'labelectrum.herokuapp.com'
|
target_host = 'labelectrum.herokuapp.com'
|
||||||
|
encode_password = None
|
||||||
|
|
||||||
def fullname(self):
|
def fullname(self):
|
||||||
return _('Label Sync')
|
return _('Label Sync')
|
||||||
|
@ -37,7 +38,6 @@ class Plugin(BasePlugin):
|
||||||
def encode(self, message):
|
def encode(self, message):
|
||||||
encrypted = aes.encryptData(self.encode_password, unicode(message))
|
encrypted = aes.encryptData(self.encode_password, unicode(message))
|
||||||
encoded_message = base64.b64encode(encrypted)
|
encoded_message = base64.b64encode(encrypted)
|
||||||
|
|
||||||
return encoded_message
|
return encoded_message
|
||||||
|
|
||||||
def decode(self, message):
|
def decode(self, message):
|
||||||
|
@ -87,6 +87,8 @@ class Plugin(BasePlugin):
|
||||||
|
|
||||||
@hook
|
@hook
|
||||||
def set_label(self, item,label, changed):
|
def set_label(self, item,label, changed):
|
||||||
|
if self.encode_password is None:
|
||||||
|
return
|
||||||
if not changed:
|
if not changed:
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue