1
0

@hook decorator for plugins

This commit is contained in:
ThomasV
2014-08-31 11:42:40 +02:00
parent ee49d14b55
commit a3790372d8
8 changed files with 46 additions and 23 deletions

View File

@@ -22,7 +22,7 @@ try:
except ImportError as e:
loaded_qweb = False
from electrum import BasePlugin
from electrum.plugins import BasePlugin, hook
from electrum.i18n import _, set_language
from electrum.util import user_dir
from electrum.util import appdata_dir
@@ -58,6 +58,7 @@ class Plugin(BasePlugin):
def enable(self):
return BasePlugin.enable(self)
@hook
def receive_tx(self, tx, wallet):
domain = wallet.get_account_addresses(None)
is_relevant, is_send, v, fee = tx.get_value(domain, wallet.prevout_values)