Skip to content

Commit a437578

Browse files
author
Kefkius
committed
Merge dash changes
2 parents c399109 + a300412 commit a437578

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+443
-441
lines changed

.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ lib/icons_rc.py
66
build/
77
dist/
88
*.egg/
9-
/electrum.py
9+
/electrum-dash.py
1010
contrib/pyinstaller/
11-
Electrum.egg-info/
11+
Electrum*.egg-info/
1212
gui/qt/icons_rc.py
1313
locale/
1414
.devlocaltmp/

MANIFEST.in

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
include README LICENCE RELEASE-NOTES AUTHORS
2-
include electrum.conf.sample
3-
include electrum.desktop
2+
include electrum-dash.conf.sample
3+
include electrum_dash.desktop
44
include *.py
5-
include electrum
5+
include electrum-dash
66
recursive-include lib *.py
77
recursive-include gui *.py
88
recursive-include plugins *.py

RELEASE-NOTES

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
in DNS (OpenAlias). The identity of the requestor is verified using
1717
DNSSEC.
1818
* Payment requests signed with OpenAlias keys can be shared as
19-
bitcoin: URIs, if they are simple (a single address-type
19+
dash: URIs, if they are simple (a single address-type
2020
output). The BIP21 URI scheme is extended with 'name', 'sig',
2121
'time', 'exp'.
2222
* Arbitrary m-of-n multisig wallets are supported (n<=15).
@@ -90,7 +90,7 @@
9090
* A Search Box is available in the GUI (Ctrl-S)
9191
* Payment requests have an expiration date and can be exported to
9292
BIP70 files.
93-
* file: scheme support in BIP72 URIs: "bitcoin:?r=file:///..."
93+
* file: scheme support in BIP72 URIs: "dash:?r=file:///..."
9494
* Own addresses are shown in green in the Transaction dialog.
9595
* Address History dialog.
9696
* The OpenAlias plugin was improved.

electrum electrum-dash

+15-15
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,19 @@ except Exception:
6262
sys.exit("cannot import ecdsa.curve_secp256k1. You probably need to upgrade ecdsa.\nTry: sudo pip install --upgrade ecdsa")
6363

6464

65-
# load local module as electrum
65+
# load local module as electrum_dash
6666
if is_bundle or is_local or is_android:
6767
import imp
68-
imp.load_module('electrum', *imp.find_module('lib'))
69-
imp.load_module('electrum_gui', *imp.find_module('gui'))
68+
imp.load_module('electrum_dash', *imp.find_module('lib'))
69+
imp.load_module('electrum_dash_gui', *imp.find_module('gui'))
7070

7171

72-
from electrum import util
73-
from electrum import SimpleConfig, Network, Wallet, WalletStorage, NetworkProxy
74-
from electrum.util import print_msg, print_error, print_stderr, print_json, set_verbosity, InvalidPassword
75-
from electrum.daemon import get_daemon
76-
from electrum.plugins import init_plugins, run_hook, always_hook
77-
from electrum.commands import get_parser, known_commands, Commands, config_variables
72+
from electrum_dash import util
73+
from electrum_dash import SimpleConfig, Network, Wallet, WalletStorage, NetworkProxy
74+
from electrum_dash.util import print_msg, print_error, print_stderr, print_json, set_verbosity, InvalidPassword
75+
from electrum_dash.daemon import get_daemon
76+
from electrum_dash.plugins import init_plugins, run_hook, always_hook
77+
from electrum_dash.commands import get_parser, known_commands, Commands, config_variables
7878

7979

8080
# get password routine
@@ -99,9 +99,9 @@ def run_gui(config):
9999
if url:
100100
if os.path.exists(url):
101101
# assume this is a payment request
102-
url = "bitcoin:?r=file://"+ os.path.join(os.getcwd(), url)
102+
url = "dash:?r=file://"+ os.path.join(os.getcwd(), url)
103103

104-
if not re.match('^bitcoin:', url):
104+
if not re.match('^dash:', url):
105105
print_stderr('unknown command:', url)
106106
sys.exit(1)
107107

@@ -110,7 +110,7 @@ def run_gui(config):
110110
gui_name = 'qt'
111111

112112
try:
113-
gui = __import__('electrum_gui.' + gui_name, fromlist=['electrum_gui'])
113+
gui = __import__('electrum_dash_gui.' + gui_name, fromlist=['electrum_dash_gui'])
114114
except ImportError:
115115
traceback.print_exc(file=sys.stdout)
116116
sys.exit()
@@ -139,7 +139,7 @@ def run_gui(config):
139139
def run_daemon(config):
140140
cmd = config.get('subcommand')
141141
if cmd not in ['start', 'stop', 'status']:
142-
print_msg("syntax: electrum daemon <start|status|stop>")
142+
print_msg("syntax: electrum-dash daemon <start|status|stop>")
143143
sys.exit(1)
144144
s = get_daemon(config, False)
145145
if cmd == 'start':
@@ -262,7 +262,7 @@ def run_cmdline(config):
262262

263263
if cmd.name not in ['create', 'restore'] and cmd.requires_wallet and not storage.file_exists:
264264
print_msg("Error: Wallet file not found.")
265-
print_msg("Type 'electrum create' to create a new wallet, or provide a path to a wallet with the -w option")
265+
print_msg("Type 'electrum-dash create' to create a new wallet, or provide a path to a wallet with the -w option")
266266
sys.exit(0)
267267

268268
# create wallet instance
@@ -299,7 +299,7 @@ def run_cmdline(config):
299299
if cmd.requires_network and not config.get('offline'):
300300
s = get_daemon(config, False)
301301
if not s:
302-
print_msg("Network daemon is not running. Try 'electrum daemon start'\nIf you want to run this command offline, use the -o flag.")
302+
print_msg("Network daemon is not running. Try 'electrum-dash daemon start'\nIf you want to run this command offline, use the -o flag.")
303303
sys.exit(1)
304304
network = NetworkProxy(s, config)
305305
network.start()

electrum-env electrum-dash-env

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ fi
1919

2020
export PYTHONPATH="/usr/local/lib/python2.7/site-packages:$PYTHONPATH"
2121

22-
./electrum "$@"
22+
./electrum-dash "$@"
2323

2424
deactivate

electrum.conf.sample electrum-dash.conf.sample

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Configuration file for the electrum client
1+
# Configuration file for the electrum-dash client
22
# Settings defined here are shared across wallets
33
#
4-
# copy this file to /etc/electrum.conf if you want read-only settings
5-
# copy it into your ~/.electrum/ directory if you want global settings
4+
# copy this file to /etc/electrum-dash.conf if you want read-only settings
5+
# copy it into your ~/.electrum-dash/ directory if you want global settings
66
# that can be rewritten by the client
77

88
[client]

electrum.desktop

-17
This file was deleted.

electrum_dash.desktop

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# If you want electrum-dash to appear in a linux app launcher ("start menu"), install this by doing:
2+
# sudo desktop-file-install electrum_dash.desktop
3+
4+
[Desktop Entry]
5+
Comment=Lightweight Dashpay Client
6+
Exec=electrum-dash %u
7+
GenericName[en_US]=Electrum-DASH
8+
GenericName=Electrum-DASH
9+
Icon=electrum_dash
10+
Name[en_US]=Electrum Dashpay Wallet
11+
Name=Electrum Dashpay Wallet
12+
Categories=Network;
13+
StartupNotify=false
14+
Terminal=false
15+
Type=Application
16+
MimeType=x-scheme-handler/bitcoin;
17+

electrum.icns electrum_dash.icns

File renamed without changes.

gui/android.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
from __future__ import absolute_import
2323
import android
2424

25-
from electrum import SimpleConfig, Wallet, WalletStorage, format_satoshis
26-
from electrum.bitcoin import is_address, COIN
27-
from electrum import util
25+
from electrum_dash import SimpleConfig, Wallet, WalletStorage, format_satoshis
26+
from electrum_dash.bitcoin import is_address, COIN
27+
from electrum_dash import util
2828
from decimal import Decimal
2929
import datetime, re
3030

@@ -474,7 +474,7 @@ def make_new_contact():
474474
if r:
475475
data = str(r['extras']['SCAN_RESULT']).strip()
476476
if data:
477-
if re.match('^bitcoin:', data):
477+
if re.match('^dash:', data):
478478
out = util.parse_URI(data)
479479
address = out.get('address')
480480
elif is_address(data):
@@ -582,7 +582,7 @@ def payto_loop():
582582
amount = droid.fullQueryDetail('amount').result.get('text')
583583

584584
if not is_address(recipient):
585-
modal_dialog('Error','Invalid Bitcoin address')
585+
modal_dialog('Error','Invalid Dash address')
586586
continue
587587

588588
try:
@@ -606,7 +606,7 @@ def payto_loop():
606606
data = str(r['extras']['SCAN_RESULT']).strip()
607607
if data:
608608
print "data", data
609-
if re.match('^bitcoin:', data):
609+
if re.match('^dash:', data):
610610
payto, amount, label, message, _ = util.parse_URI(data)
611611
if amount:
612612
amount = str(amount / COIN)
@@ -661,7 +661,7 @@ def receive_loop():
661661
modal_dialog('URI copied to clipboard', receive_URI)
662662

663663
elif event["name"]=="amount":
664-
amount = modal_input('Amount', 'Amount you want to receive (in BTC). ', format_satoshis(receive_amount) if receive_amount else None, "numberDecimal")
664+
amount = modal_input('Amount', 'Amount you want to receive (in DASH). ', format_satoshis(receive_amount) if receive_amount else None, "numberDecimal")
665665
if amount is not None:
666666
receive_amount = int(COIN * Decimal(amount)) if amount else None
667667
out = 'receive'
@@ -880,7 +880,7 @@ def make_bitmap(data):
880880
droid.dialogShow()
881881
try:
882882
import qrcode
883-
from electrum import bmp
883+
from electrum_dash import bmp
884884
qr = qrcode.QRCode()
885885
qr.add_data(data)
886886
bmp.save_qrcode(qr,"/sdcard/sl4a/qrcode.bmp")

gui/gtk.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,18 @@
2424
gi.require_version('Gtk', '3.0')
2525
from gi.repository import Gtk, Gdk, GObject, cairo
2626
from decimal import Decimal
27-
from electrum.util import print_error, InvalidPassword
28-
from electrum.bitcoin import is_valid, COIN
29-
from electrum.wallet import NotEnoughFunds
30-
from electrum import WalletStorage, Wallet
27+
from electrum_dash.util import print_error, InvalidPassword
28+
from electrum_dash.bitcoin import is_valid, COIN
29+
from electrum_dash.wallet import NotEnoughFunds
30+
from electrum_dash import WalletStorage, Wallet
3131

3232
Gdk.threads_init()
3333
APP_NAME = "Electrum"
3434
import platform
3535
MONOSPACE_FONT = 'Lucida Console' if platform.system() == 'Windows' else 'monospace'
3636

37-
from electrum.util import format_satoshis, parse_URI
38-
from electrum.bitcoin import MIN_RELAY_TX_FEE
37+
from electrum_dash.util import format_satoshis, parse_URI
38+
from electrum_dash.bitcoin import MIN_RELAY_TX_FEE
3939

4040
def numbify(entry, is_int = False):
4141
text = entry.get_text().strip()
@@ -466,7 +466,7 @@ def __init__(self, wallet, config, network):
466466
self.window.set_default_size(720, 350)
467467
self.wallet_updated = False
468468

469-
from electrum.util import StoreDict
469+
from electrum_dash.util import StoreDict
470470
self.contacts = StoreDict(self.config, 'contacts')
471471

472472
vbox = Gtk.VBox()

gui/jsonrpc.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
import socket, os
2626
from jsonrpclib.SimpleJSONRPCServer import SimpleJSONRPCServer, SimpleJSONRPCRequestHandler
2727

28-
from electrum.wallet import WalletStorage, Wallet
29-
from electrum.commands import known_commands, Commands
28+
from electrum_dash.wallet import WalletStorage, Wallet
29+
from electrum_dash.commands import known_commands, Commands
3030

3131

3232
class RequestHandler(SimpleJSONRPCRequestHandler):

gui/qt/__init__.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@
3434
from PyQt4.QtCore import *
3535
import PyQt4.QtCore as QtCore
3636

37-
from electrum.i18n import _, set_language
38-
from electrum.util import print_error, print_msg
39-
from electrum.plugins import run_hook, always_hook
40-
from electrum import WalletStorage, Wallet
41-
from electrum.bitcoin import MIN_RELAY_TX_FEE
37+
from electrum_dash.i18n import _, set_language
38+
from electrum_dash.util import print_error, print_msg
39+
from electrum_dash.plugins import run_hook, always_hook
40+
from electrum_dash import WalletStorage, Wallet
41+
from electrum_dash.bitcoin import MIN_RELAY_TX_FEE
4242

4343
try:
4444
import icons_rc
@@ -79,7 +79,7 @@ def build_tray_menu(self):
7979
m.addAction(_("Show/Hide"), self.show_or_hide)
8080
m.addAction(_("Dark/Light"), self.toggle_tray_icon)
8181
m.addSeparator()
82-
m.addAction(_("Exit Electrum"), self.close)
82+
m.addAction(_("Exit Electrum-DASH"), self.close)
8383
self.tray.setContextMenu(m)
8484

8585
def toggle_tray_icon(self):
@@ -121,7 +121,7 @@ def init_lite(self):
121121
import lite_window
122122
if not self.check_qt_version():
123123
if self.config.get('lite_mode') is True:
124-
msg = "Electrum was unable to load the 'Lite GUI' because it needs Qt version >= 4.7.\nChanging your config to use the 'Classic' GUI"
124+
msg = "Electrum-DASH was unable to load the 'Lite GUI' because it needs Qt version >= 4.7.\nChanging your config to use the 'Classic' GUI"
125125
QMessageBox.warning(None, "Could not start Lite GUI.", msg)
126126
self.config.set_key('lite_mode', False, True)
127127
sys.exit(0)
@@ -201,7 +201,7 @@ def main(self, url):
201201
self.dark_icon = self.config.get("dark_icon", False)
202202
icon = QIcon(":icons/electrum_dark_icon.png") if self.dark_icon else QIcon(':icons/electrum_light_icon.png')
203203
self.tray = QSystemTrayIcon(icon, None)
204-
self.tray.setToolTip('Electrum')
204+
self.tray.setToolTip('Electrum-DASH')
205205
self.tray.activated.connect(self.tray_activated)
206206
self.build_tray_menu()
207207
self.tray.show()

gui/qt/address_dialog.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1818

1919
import sys, time, datetime, re, threading
20-
from electrum.i18n import _, set_language
21-
from electrum.util import print_error, print_msg
20+
from electrum_dash.i18n import _, set_language
21+
from electrum_dash.util import print_error, print_msg
2222
import os.path, json, ast, traceback
2323
import shutil
2424
import StringIO

gui/qt/amountedit.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from PyQt4.QtGui import *
55

66
from decimal import Decimal
7-
from electrum.util import format_satoshis_plain
7+
from electrum_dash.util import format_satoshis_plain
88

99
class MyLineEdit(QLineEdit):
1010
frozen = pyqtSignal()
@@ -79,11 +79,11 @@ def _base_unit(self):
7979
p = self.decimal_point()
8080
assert p in [2, 5, 8]
8181
if p == 8:
82-
return 'BTC'
82+
return 'DASH'
8383
if p == 5:
84-
return 'mBTC'
84+
return 'mDASH'
8585
if p == 2:
86-
return 'bits'
86+
return 'uDASH'
8787
raise Exception('Unknown base unit')
8888

8989
def get_amount(self):

gui/qt/console.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import traceback, platform
55
from PyQt4 import QtCore
66
from PyQt4 import QtGui
7-
from electrum import util
7+
from electrum_dash import util
88

99

1010
if platform.system() == 'Windows':

gui/qt/history_widget.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
import webbrowser
2121

2222
from util import *
23-
from electrum.i18n import _
24-
from electrum.util import block_explorer_URL, format_satoshis, format_time
25-
from electrum.plugins import run_hook
23+
from electrum_dash.i18n import _
24+
from electrum_dash.util import block_explorer_URL, format_satoshis, format_time
25+
from electrum_dash.plugins import run_hook
2626

2727

2828
class HistoryWidget(MyTreeWidget):

gui/qt/history_widget_lite.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from PyQt4.QtGui import *
2-
from electrum.i18n import _
2+
from electrum_dash.i18n import _
33

44
class HistoryWidget(QTreeWidget):
55

0 commit comments

Comments
 (0)