fix labels plugin init()
authorThomasV <thomasv@gitorious>
Thu, 8 Aug 2013 03:47:24 +0000 (05:47 +0200)
committerThomasV <thomasv@gitorious>
Thu, 8 Aug 2013 03:47:24 +0000 (05:47 +0200)
plugins/labels.py

index fb51b16..b119635 100644 (file)
@@ -45,9 +45,7 @@ class Plugin(BasePlugin):
 
     def init(self):
         self.target_host = 'labelectrum.herokuapp.com'
-        self.wallet = gui.wallet
-        self.gui = gui
-        self.config = gui.config
+        self.wallet = self.gui.wallet
         self.labels = self.wallet.labels
         self.transactions = self.wallet.transactions
         mpk = self.wallet.master_public_keys["m/0'/"][1]
@@ -145,6 +143,7 @@ class Plugin(BasePlugin):
 
     def enable(self):
         if not self.auth_token(): # First run, throw plugin settings in your face
+            self.init()
             if self.settings_dialog():
                 self.set_enabled(True)
                 return True