electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 8f5d48584de720bd484fbe69b395e3e2de45af09
parent fd8af94419f76ea06e8d7d5b953fd44a73065512
Author: Amir Taaki <genjix@riseup.net>
Date:   Thu, 19 Jul 2012 01:57:09 +0200

Added AcceptBit integration.

Diffstat:
Mlib/gui_lite.py | 12++++++++++++
1 file changed, 12 insertions(+), 0 deletions(-)

diff --git a/lib/gui_lite.py b/lib/gui_lite.py @@ -11,6 +11,7 @@ import re import sys import time import wallet +import webbrowser try: import lib.gui_qt as gui_qt @@ -118,12 +119,15 @@ class MiniWindow(QDialog): interact_button.setObjectName("interact_button") app_menu = QMenu(interact_button) + acceptbit_action = app_menu.addAction(_("A&cceptBit")) report_action = app_menu.addAction(_("&Report Bug")) about_action = app_menu.addAction(_("&About Electrum")) app_menu.addSeparator() quit_action = app_menu.addAction(_("&Quit")) interact_button.setMenu(app_menu) + self.connect(acceptbit_action, SIGNAL("triggered()"), + self.acceptbit) self.connect(report_action, SIGNAL("triggered()"), self.show_report_bug) self.connect(about_action, SIGNAL("triggered()"), self.show_about) @@ -309,6 +313,9 @@ class MiniWindow(QDialog): def update_completions(self, completions): self.address_completions.setStringList(completions) + def acceptbit(self): + self.actuator.acceptbit(self.quote_currencies[0]) + def show_about(self): QMessageBox.about(self, "Electrum", _("Electrum's focus is speed, with low resource usage and simplifying Bitcoin. You do not need to perform regular backups, because your wallet can be recovered from a secret phrase that you can memorize or write on paper. Startup times are instant because it operates in conjuction with high-performance servers that handle the most complicated parts of the Bitcoin system.")) @@ -553,6 +560,11 @@ class MiniActuator: def is_valid(self, address): return self.wallet.is_valid(address) + def acceptbit(self, currency): + master_pubkey = self.wallet.master_public_key.encode("hex") + url = "http://acceptbit.com/mpk/%s/%s" % (master_pubkey, currency) + webbrowser.open(url) + class MiniDriver(QObject): INITIALIZING = 0