diff --git a/.gitignore b/.gitignore
index 862683a..7a4e336 100644
--- a/.gitignore
+++ b/.gitignore
@@ -32,6 +32,7 @@ cscope.po.out
*.lo
*.o
*.obj
+*.pyc
# Precompiled Headers
*.gch
diff --git a/README.md b/README.md
index 0368d8f..fabfa86 100644
--- a/README.md
+++ b/README.md
@@ -1,34 +1,36 @@
-# Ombre GUI Wallet
-
-Copyright (c) 2018, OMBRE
-Copyright (c) 2017, Sumokoin.org
-
-**One of the most easy-to-use, intuitive GUI (full) wallets in crypto.**
-
-# Installation & running from source codes
-
-1. Clone the repo:
-
- git clone https://github.com/ombre-projects/OmbreGUIWallet/ SumoGUIWallet
-
+# Sumokoin GUI Wallet
+
+Copyright (c) 2017, Sumokoin.org
+
+**One of the most easy-to-use, intuitive GUI (full) wallets in crypto.**
+
+
+
+
+# Installation & running from source codes
+
+1. Clone the repo:
+
+ git clone https://github.com/sumoprojects/SumoGUIWallet SumoGUIWallet
+
2. Install dependencies (with Python 2.7):
-
+
* Generally, you can use Python `pip` to install required components:
-
- pip install PySide, requests, psutil
-
- * or
-
- pip install -r requirements.txt
-
+
+ pip install PySide, requests, psutil
+
+ * or
+
+ pip install -r requirements.txt
+
* On some OSes, PySide may be required to install from pre-built packages. For example, on Ubuntu 16.04, install PySide with the following command:
-
- sudo apt install python-pyside
-
-
-3. Build/download Sumokoin binaries from [Ombre repo](https://github.com/ombre-projects/ombre) and put it to `Resources/bin` sub-directory.
-
-4. Run the wallet (Python 2.7):
-
- cd /path/to/SumoGUIWallet
- python wallet.py
+
+ sudo apt install python-pyside
+
+
+3. Build/download Sumokoin binaries from [Sumokoin repo](https://github.com/sumoprojects/sumokoin) and put it to `Resources/bin` sub-directory.
+
+4. Run the wallet (Python 2.7):
+
+ cd /path/to/SumoGUIWallet
+ python wallet.py
diff --git a/Resources/icons/logo_black_32.png b/Resources/icons/logo_black_32.png
deleted file mode 100644
index 3df2f53..0000000
Binary files a/Resources/icons/logo_black_32.png and /dev/null differ
diff --git a/Resources/icons/logo_black_64.png b/Resources/icons/logo_black_64.png
deleted file mode 100644
index 092f147..0000000
Binary files a/Resources/icons/logo_black_64.png and /dev/null differ
diff --git a/Resources/icons/sumokoin.icns b/Resources/icons/ombre.icns
similarity index 100%
rename from Resources/icons/sumokoin.icns
rename to Resources/icons/ombre.icns
diff --git a/Resources/icons/ombre.ico b/Resources/icons/ombre.ico
new file mode 100644
index 0000000..5d137ad
Binary files /dev/null and b/Resources/icons/ombre.ico differ
diff --git a/Resources/icons/ombre.png b/Resources/icons/ombre.png
new file mode 100644
index 0000000..baf70ff
Binary files /dev/null and b/Resources/icons/ombre.png differ
diff --git a/Resources/icons/ombre_16x16.png b/Resources/icons/ombre_16x16.png
new file mode 100644
index 0000000..f0340dc
Binary files /dev/null and b/Resources/icons/ombre_16x16.png differ
diff --git a/Resources/icons/ombre_16x16_mac.png b/Resources/icons/ombre_16x16_mac.png
new file mode 100644
index 0000000..f0340dc
Binary files /dev/null and b/Resources/icons/ombre_16x16_mac.png differ
diff --git a/Resources/icons/ombre_icon_32.png b/Resources/icons/ombre_icon_32.png
new file mode 100644
index 0000000..baf70ff
Binary files /dev/null and b/Resources/icons/ombre_icon_32.png differ
diff --git a/Resources/icons/ombre_icon_64.png b/Resources/icons/ombre_icon_64.png
new file mode 100644
index 0000000..021c0bf
Binary files /dev/null and b/Resources/icons/ombre_icon_64.png differ
diff --git a/Resources/icons/sumokoin.ico b/Resources/icons/sumokoin.ico
deleted file mode 100644
index 8f78868..0000000
Binary files a/Resources/icons/sumokoin.ico and /dev/null differ
diff --git a/app/QSingleApplication.py b/app/QSingleApplication.py
index b7d3aed..7ca5829 100644
--- a/app/QSingleApplication.py
+++ b/app/QSingleApplication.py
@@ -2,8 +2,8 @@
# -*- coding: utf-8 -*-
## Copyright (c) 2017, The Sumokoin Project (www.sumokoin.org)
'''
-QSingleApplication is a wrapper class for creating single interface
-of appliaction
+QSingleApplication is a wrapper class for creating single interface
+of appliaction
'''
from __future__ import print_function
@@ -11,12 +11,12 @@
from PySide.QtGui import QApplication
from PySide.QtCore import QIODevice, QTimer
-from PySide.QtNetwork import QLocalServer, QLocalSocket
+from PySide.QtNetwork import QLocalServer, QLocalSocket
from utils.common import getSockDir, makeDir
-DATA_DIR = makeDir(os.path.join(getSockDir(), 'OmbreGUIWallet'))
-
+DATA_DIR = makeDir(os.path.join(getSockDir(), 'OmbreGUI'))
+
class QSingleApplication(QApplication):
sock_file = 'ombre_wallet_sock'
if sys.platform == 'win32':
@@ -25,7 +25,7 @@ class QSingleApplication(QApplication):
sock_file = os.path.join(DATA_DIR, '.%s' % sock_file)
else:
sock_file = os.path.join(getSockDir(), sock_file)
-
+
def singleStart(self, appMain):
self.appMain = appMain
# Socket
@@ -33,13 +33,13 @@ def singleStart(self, appMain):
self.m_socket.connected.connect(self.connectToExistingApp)
self.m_socket.error.connect(lambda:self.startApplication(first_start=True))
self.m_socket.connectToServer(self.sock_file, QIODevice.WriteOnly)
-
+
def connectToExistingApp(self):
# Quit application in 250 ms
QTimer.singleShot(250, self.quit)
print( "App is already running.", file=sys.stderr )
-
-
+
+
def startApplication(self, first_start=True):
self.m_server = QLocalServer()
if self.m_server.listen(self.sock_file):
@@ -50,7 +50,7 @@ def startApplication(self, first_start=True):
print( "Error listening the socket. App can't start!", file=sys.stderr )
QTimer.singleShot(250, self.quit)
return
-
+
# remove the listener path file and try to restart app one more time
print( "Error listening the socket. Try to restart application...", file=sys.stderr )
if sys.platform != 'win32':
@@ -58,13 +58,13 @@ def startApplication(self, first_start=True):
os.unlink(self.sock_file)
except Exception, err:
print( err, file=sys.stderr )
-
+
QTimer.singleShot(250, lambda : self.startApplication(first_start=False))
-
+
def getNewConnection(self):
self.new_socket = self.m_server.nextPendingConnection()
self.new_socket.readyRead.connect(self.readSocket)
-
+
def readSocket(self):
f = self.new_socket.readLine()
- self.appMain.processURLProtocol(str(f))
+ self.appMain.processURLProtocol(str(f))
\ No newline at end of file
diff --git a/app/hub.py b/app/hub.py
index 3394de3..b74ef9d 100644
--- a/app/hub.py
+++ b/app/hub.py
@@ -22,7 +22,7 @@
from PySide.QtCore import QObject, Slot, Signal
from utils.common import print_money, print_money2, readFile
-
+
from settings import APP_NAME, VERSION, DATA_DIR, COIN, makeDir, seed_languages
from utils.logger import log, LEVEL_ERROR, LEVEL_INFO
@@ -35,7 +35,7 @@
wallet_dir_path = os.path.join(DATA_DIR, 'wallets')
makeDir(wallet_dir_path)
-
+
password_regex = re.compile(r"^([a-zA-Z0-9!@#\$%\^&\*]{1,256})$")
from webui import LogViewer
@@ -44,14 +44,14 @@ class Hub(QObject):
def __init__(self, app):
super(Hub, self).__init__()
self.app = app
-
-
+
+
def setUI(self, ui):
self.ui = ui
-
+
def setNewWalletUI(self, new_wallet_ui):
self.new_wallet_ui = new_wallet_ui
-
+
@Slot()
def import_wallet(self):
dlg = QFileDialog(self.new_wallet_ui, "Select Import Wallet File")
@@ -61,12 +61,12 @@ def import_wallet(self):
wallet_filename = dlg.selectedFiles()[0]
else:
return
-
+
new_wallet_file = os.path.join(wallet_dir_path, str(uuid.uuid4().hex) + '.bin')
if wallet_filename:
wallet_key_filename = wallet_filename + '.keys'
wallet_address_filename = wallet_filename + '.address.txt'
-
+
if not os.path.exists(wallet_key_filename):
QMessageBox.warning(self.new_wallet_ui, \
'Import Wallet',\
@@ -74,7 +74,7 @@ def import_wallet(self):
Are you sure to select correct wallet file?
Hint: Wallet file often ends with .bin""")
return False
- try:
+ try:
copy2(wallet_filename, os.path.join(wallet_dir_path, new_wallet_file))
copy2(wallet_key_filename, os.path.join(wallet_dir_path, \
new_wallet_file + '.keys'))
@@ -84,10 +84,10 @@ def import_wallet(self):
self._detail_error_msg("Importing Wallet", "Error importing wallet!", str(err))
self.ui.reset_wallet()
return False
-
+
if not os.path.exists(new_wallet_file):
return False
-
+
wallet_password = None
while True:
wallet_password, result = self._custom_input_dialog(self.new_wallet_ui, \
@@ -100,11 +100,11 @@ def import_wallet(self):
else:
break
else:
- return False
-
+ return False
+
self.on_new_wallet_show_progress_event.emit('Importing wallet...')
self.app_process_events()
-
+
wallet_address_filepath = new_wallet_file + ".address.txt"
wallet_address = readFile(wallet_address_filepath)
self.ui.wallet_info.wallet_filepath = new_wallet_file
@@ -137,7 +137,7 @@ def import_wallet(self):
QMessageBox.critical(self.new_wallet_ui, \
'Error Importing Wallet',\
"""Error: Unknown error.
- Imported wallet file may be corrupted.
+ Imported wallet file may be corrupted.
Try to restore it with mnemonic seed instead.""")
self.ui.reset_wallet()
return False
@@ -145,8 +145,8 @@ def import_wallet(self):
self._show_wallet_info()
self.ui.wallet_info.save()
return True
-
-
+
+
@Slot()
def close_new_wallet_dialog(self):
log("Closing new wallet dialog...", LEVEL_INFO)
@@ -154,7 +154,7 @@ def close_new_wallet_dialog(self):
if self.ui.wallet_info.wallet_filepath \
and os.path.exists(self.ui.wallet_info.wallet_filepath):
self.ui.show_wallet();
-
+
@Slot(unicode)
def create_new_wallet(self, mnemonic_seed=u''):
@@ -172,7 +172,7 @@ def create_new_wallet(self, mnemonic_seed=u''):
"Password must contain at least 1 character [a-zA-Z] or number [0-9]\
or special character like !@#$%^&* and not contain spaces")
continue
-
+
confirm_password, result = self._custom_input_dialog(self.new_wallet_ui, \
'Wallet Password', \
"Confirm wallet password:", QLineEdit.Password)
@@ -187,13 +187,13 @@ def create_new_wallet(self, mnemonic_seed=u''):
break
else:
break
-
+
if has_password:
if not mnemonic_seed: # i.e. create new wallet
mnemonic_seed_language = "0" # english
seed_language_list = [sl[1] for sl in seed_languages]
- lang, ok = QInputDialog.getItem(self.new_wallet_ui, "Mnemonic Seed Language",
- "Select a language for wallet mnemonic seed:",
+ lang, ok = QInputDialog.getItem(self.new_wallet_ui, "Mnemonic Seed Language",
+ "Select a language for wallet mnemonic seed:",
seed_language_list, 0, False)
if ok and lang:
for sl in seed_languages:
@@ -205,12 +205,12 @@ def create_new_wallet(self, mnemonic_seed=u''):
'Mnemonic Seed Language',\
"No language is selected!\
'English' will be used for mnemonic seed")
-
+
self.on_new_wallet_show_progress_event.emit("Restoring wallet..." \
if mnemonic_seed else "Creating wallet...")
self.app_process_events()
wallet_filepath = os.path.join(wallet_dir_path, str(uuid.uuid4().hex) + '.bin')
- wallet_log_path = os.path.join(wallet_dir_path, 'sumo-wallet-cli.log')
+ wallet_log_path = os.path.join(wallet_dir_path, 'ombre-wallet-cli.log')
resources_path = self.app.property("ResPath")
if not mnemonic_seed: # i.e. create new wallet
self.wallet_cli_manager = WalletCliManager(resources_path, \
@@ -238,7 +238,7 @@ def create_new_wallet(self, mnemonic_seed=u''):
self.wallet_cli_manager.send_command(wallet_password)
self.app_process_events(0.5)
self.wallet_cli_manager.send_command("exit")
-
+
self.app_process_events(2)
except Exception, err:
log(str(err), LEVEL_ERROR)
@@ -249,7 +249,7 @@ def create_new_wallet(self, mnemonic_seed=u''):
error_detailed_text)
self.on_new_wallet_ui_reset_event.emit()
return
-
+
if os.path.exists(wallet_filepath):
wallet_address = readFile(wallet_filepath + ".address.txt")
self.ui.wallet_info.wallet_filepath = wallet_filepath
@@ -258,7 +258,7 @@ def create_new_wallet(self, mnemonic_seed=u''):
self.ui.wallet_info.is_loaded = True
self.ui.run_wallet_rpc(wallet_password, 2)
counter = 0
-
+
while not self.ui.wallet_rpc_manager.is_ready():
self.app_process_events(0.5)
if self.ui.wallet_rpc_manager.block_hex:
@@ -280,26 +280,26 @@ def create_new_wallet(self, mnemonic_seed=u''):
"""Error: Unknown error! Wallet RPC appears not responding.""")
self.ui.reset_wallet()
return
-
+
self._show_wallet_info()
self.ui.wallet_info.save()
- else:
+ else:
self.on_new_wallet_ui_reset_event.emit()
-
+
@Slot()
def rescan_spent(self):
self.app_process_events()
self.ui.wallet_rpc_manager.rpc_request.rescan_spent()
-
+
# refresh wallet_info tx cache
self.ui.wallet_info.top_tx_height = 0
self.ui.wallet_info.bc_height = -1
self.ui.wallet_info.wallet_transfers = []
self.ui.update_wallet_info()
-
+
self.on_wallet_rescan_spent_completed_event.emit()
-
-
+
+
@Slot()
def rescan_bc(self):
result = QMessageBox.question(self.ui, "Rescan Blockchain", \
@@ -308,19 +308,19 @@ def rescan_bc(self):
if result == QMessageBox.No:
self.on_wallet_rescan_bc_completed_event.emit()
return
-
+
self.app_process_events()
self.ui.wallet_rpc_manager.rpc_request.rescan_bc()
-
+
# refresh wallet_info tx cache
self.ui.wallet_info.top_tx_height = 0
self.ui.wallet_info.bc_height = -1
self.ui.wallet_info.wallet_transfers = []
self.ui.update_wallet_info()
-
+
self.on_wallet_rescan_bc_completed_event.emit()
-
-
+
+
@Slot(float, str, str, int, int, str, bool, bool)
def send_tx(self, amount, address, payment_id, priority, mixin, tx_desc, save_address, sweep_all):
if not payment_id and not address.startswith("Sumi"):
@@ -330,7 +330,7 @@ def send_tx(self, amount, address, payment_id, priority, mixin, tx_desc, save_ad
if result == QMessageBox.No:
self.on_wallet_send_tx_completed_event.emit('{"status": "CANCELLED", "message": "Sending coin cancelled"}')
return
-
+
if sweep_all:
result = QMessageBox.question(self.ui, "Sending all your coins?", \
"This will send all your coins to target address.
Are you sure you want to proceed?", \
@@ -338,21 +338,21 @@ def send_tx(self, amount, address, payment_id, priority, mixin, tx_desc, save_ad
if result == QMessageBox.No:
self.on_wallet_send_tx_completed_event.emit('{"status": "CANCELLED", "message": "Sending coin cancelled"}')
return
-
+
wallet_password, result = self._custom_input_dialog(self.ui, \
"Wallet Password", "Please enter wallet password:", QLineEdit.Password)
-
+
if not result:
self.on_wallet_send_tx_completed_event.emit('{"status": "CANCELLED", "message": "Wrong wallet password"}');
return
-
+
if hashlib.sha256(wallet_password).hexdigest() != self.ui.wallet_info.wallet_password:
self.on_wallet_send_tx_completed_event.emit('{"status": "CANCELLED", "message": "Wrong wallet password"}');
QMessageBox.warning(self.ui, "Incorrect Wallet Password", "Wallet password is not correct!")
return
-
+
amount = int(amount*COIN)
-
+
if sweep_all:
_, _, per_subaddress = self.ui.wallet_rpc_manager.rpc_request.get_balance()
subaddr_indices = []
@@ -360,10 +360,10 @@ def send_tx(self, amount, address, payment_id, priority, mixin, tx_desc, save_ad
if s['unlocked_balance'] > 0:
subaddr_indices.append(s['address_index'])
ret = self.ui.wallet_rpc_manager.rpc_request.transfer_all(address, payment_id, priority, mixin, 0, subaddr_indices)
- else:
+ else:
ret = self.ui.wallet_rpc_manager.rpc_request.transfer_split(amount, \
- address, payment_id, priority, mixin)
-
+ address, payment_id, priority, mixin)
+
if ret['status'] == "ERROR":
self.on_wallet_send_tx_completed_event.emit(json.dumps(ret));
self.app_process_events()
@@ -371,11 +371,11 @@ def send_tx(self, amount, address, payment_id, priority, mixin, tx_desc, save_ad
msg = "Not possible to send coins. Probably, there is not enough money left for fee."
else:
msg = ret['message']
-
+
QMessageBox.critical(self.ui, \
'Error Sending Coins',\
"ERROR
" + msg)
-
+
if ret['status'] == "OK":
if tx_desc:
# set the same note for all txs:
@@ -383,10 +383,10 @@ def send_tx(self, amount, address, payment_id, priority, mixin, tx_desc, save_ad
for i in range(len(ret['tx_hash_list'])):
notes.append(tx_desc)
self.ui.wallet_rpc_manager.rpc_request.set_tx_notes(ret['tx_hash_list'], notes)
-
+
self.on_wallet_send_tx_completed_event.emit(json.dumps(ret));
self.app_process_events()
-
+
msg = "Coins successfully sent in the following transaction(s):
"
for i in range(len(ret['tx_hash_list'])):
if sweep_all:
@@ -397,7 +397,7 @@ def send_tx(self, amount, address, payment_id, priority, mixin, tx_desc, save_ad
print_money2(ret['fee_list'][i]))
QMessageBox.information(self.ui, 'Coins Sent', msg)
self.ui.update_wallet_info()
-
+
if save_address:
desc, _ = self._custom_input_dialog(self.ui, \
'Saving Address...', \
@@ -406,28 +406,28 @@ def send_tx(self, amount, address, payment_id, priority, mixin, tx_desc, save_ad
payment_id, desc)
if ret['status'] == "OK":
if self.ui.wallet_info.wallet_address_book:
- address_entry = {"address": address,
- "payment_id": payment_id,
- "description": desc[0:200],
+ address_entry = {"address": address,
+ "payment_id": payment_id,
+ "description": desc[0:200],
"index": ret["index"]
}
self.ui.wallet_info.wallet_address_book.append(address_entry)
-
+
QMessageBox.information(self.ui, "Address Saved", \
- "Address (and payment ID) saved to address book.")
-
-
+ "Address (and payment ID) saved to address book.")
+
+
@Slot(int)
def generate_payment_id(self, hex_length=16):
payment_id = binascii.b2a_hex(os.urandom(hex_length/2))
integrated_address = self.ui.wallet_rpc_manager.rpc_request.make_integrated_address(payment_id)["integrated_address"]
self.on_generate_payment_id_event.emit(payment_id, integrated_address);
-
-
+
+
@Slot(str)
def copy_text(self, text):
QApplication.clipboard().setText(text)
-
+
@Slot()
def load_address_book(self):
if not self.ui.wallet_info.wallet_address_book:
@@ -436,9 +436,9 @@ def load_address_book(self):
if ret['status'] == "OK" and "entries" in ret:
address_book = ret["entries"]
self.ui.wallet_info.wallet_address_book = address_book
-
+
self.on_load_address_book_completed_event.emit( json.dumps(self.ui.wallet_info.wallet_address_book) )
-
+
@Slot(int)
def delete_address_book(self, index):
result = QMessageBox.question(self.ui, "Delete Address Book Entry", \
@@ -453,8 +453,8 @@ def delete_address_book(self, index):
address_book.pop(i)
break
self.load_address_book()
-
-
+
+
def _find_tx(self, transfers, tx_id, bc_height):
if transfers["status"] == "OK":
if "out" in transfers:
@@ -464,7 +464,7 @@ def _find_tx(self, transfers, tx_id, bc_height):
tx["status"] = "out"
tx["confirmation"] = bc_height - tx["height"] if bc_height > tx["height"] else 0
return tx
-
+
if "in" in transfers:
for tx in transfers["in"]:
if tx['txid'] == tx_id:
@@ -472,7 +472,7 @@ def _find_tx(self, transfers, tx_id, bc_height):
tx["status"] = "in"
tx["confirmation"] = bc_height - tx["height"] if bc_height > tx["height"] else 0
return tx
-
+
if "pending" in transfers:
for tx in transfers["pending"]:
if tx['txid'] == tx_id:
@@ -480,7 +480,7 @@ def _find_tx(self, transfers, tx_id, bc_height):
tx["status"] = "pool"
tx["confirmation"] = 0
return tx
-
+
if "pool" in transfers:
for tx in transfers["pool"]:
if tx['txid'] == tx_id:
@@ -489,23 +489,23 @@ def _find_tx(self, transfers, tx_id, bc_height):
tx["confirmation"] = 0
return tx
return None
-
+
@Slot(int, str)
def view_tx_detail(self, height, tx_id):
if height > 0:
transfers = self.ui.wallet_rpc_manager.rpc_request.get_transfers(filter_by_height=True, min_height=height-1, max_height=height)
else:
transfers = self.ui.wallet_rpc_manager.rpc_request.get_transfers(tx_pending=True, tx_in_pool=True)
-
+
tx = self._find_tx(transfers, tx_id, self.ui.target_height)
if not tx:
self.on_tx_detail_found_event.emit('{"status": "ERROR"}')
QMessageBox.warning(self.ui, "Transaction Details", "Transaction id: %s
not found!" % tx_id)
return
-
+
self.on_tx_detail_found_event.emit( json.dumps(tx) )
-
-
+
+
@Slot(int)
def load_tx_history(self, current_page=0):
if current_page <= 0: current_page = 1
@@ -516,21 +516,21 @@ def load_tx_history(self, current_page=0):
for tx in txs:
tx["confirmation"] = self.ui.target_height - tx["height"] \
if self.ui.target_height > tx["height"] and tx["height"] > 0 else 0
-
+
num_of_pages = int(len(all_txs) + txs_per_page - 1)/txs_per_page
pagination_slots = 10
start_page = (int(current_page - 1)/pagination_slots)*pagination_slots + 1
end_page = start_page + (pagination_slots - 1) \
if start_page + (pagination_slots - 1) < num_of_pages else num_of_pages
ret = {"txs": txs,
- "current_page": current_page,
+ "current_page": current_page,
"num_of_pages": num_of_pages,
"start_page": start_page,
"end_page": end_page}
-
+
self.on_load_tx_history_completed_event.emit( json.dumps(ret) );
-
-
+
+
@Slot()
def open_new_wallet(self):
result = QMessageBox.question(self.ui, "Open/Create New Wallet", \
@@ -538,19 +538,19 @@ def open_new_wallet(self):
QMessageBox.Yes | QMessageBox.No, defaultButton=QMessageBox.No)
if result == QMessageBox.No:
return
-
+
wallet_password, result = self._custom_input_dialog(self.ui, \
"Wallet Password", "Please enter wallet password:", QLineEdit.Password)
if not result:
return
-
+
if hashlib.sha256(wallet_password).hexdigest() != self.ui.wallet_info.wallet_password:
QMessageBox.warning(self.ui, "Incorrect Wallet Password", "Wallet password is not correct!")
return
-
+
self.ui.show_new_wallet_ui()
-
-
+
+
@Slot(str)
def view_wallet_key(self, key_type):
wallet_password, result = self._custom_input_dialog(self.ui, \
@@ -558,12 +558,12 @@ def view_wallet_key(self, key_type):
if not result:
self.on_view_wallet_key_completed_event.emit("", "");
return
-
+
if hashlib.sha256(wallet_password).hexdigest() != self.ui.wallet_info.wallet_password:
self.on_view_wallet_key_completed_event.emit("", "");
QMessageBox.warning(self.ui, "Incorrect Wallet Password", "Wallet password is not correct!")
return
-
+
ret = self.ui.wallet_rpc_manager.rpc_request.query_key(key_type)
title = "Wallet Key"
if key_type == "mnemonic":
@@ -572,66 +572,66 @@ def view_wallet_key(self, key_type):
title = "Wallet view-key"
if key_type == "spend_key":
title = "Wallet spend-key"
-
+
self.on_view_wallet_key_completed_event.emit(title, ret)
-
-
+
+
@Slot(int)
def set_daemon_log_level(self, level):
# save log level
self.ui.app_settings.settings['daemon']['log_level'] = level
self.ui.app_settings.save()
-
-
+
+
@Slot(int)
def set_block_sync_size(self, sync_size):
self.ui.app_settings.settings['daemon']['block_sync_size'] = sync_size
self.ui.app_settings.save()
-
+
@Slot()
def load_app_settings(self):
self.on_load_app_settings_completed_event.emit( json.dumps(self.ui.app_settings.settings) )
-
+
@Slot()
def about_app(self):
self.ui.about()
-
+
@Slot(str)
def open_link(self, link):
webbrowser.open(link)
-
+
@Slot()
def restart_daemon(self):
self.app_process_events(1)
- self.ui.sumokoind_daemon_manager.stop()
+ self.ui.omrbredd_daemon_manager.stop()
self.ui.start_deamon()
self.app_process_events(5)
self.on_restart_daemon_completed_event.emit()
-
-
+
+
@Slot()
def view_daemon_log(self):
- log_file = os.path.join(DATA_DIR, 'logs', "sumokoind.log")
+ log_file = os.path.join(DATA_DIR, 'logs', "ombred.log")
log_dialog = LogViewer(parent=self.ui, log_file=log_file)
log_dialog.load_log()
-
- @Slot()
+
+ @Slot()
def paste_seed_words(self):
text = QApplication.clipboard().text()
self.on_paste_seed_words_event.emit(text)
-
-
+
+
def update_daemon_status(self, status):
self.on_daemon_update_status_event.emit(status)
-
-
+
+
def app_process_events(self, seconds=1):
for _ in range(int(seconds*10)):
self.app.processEvents()
sleep(.1)
-
-
-
+
+
+
def _detail_error_msg(self, title, error_text, error_detailed_text):
msg = QMessageBox(self.new_wallet_ui)
msg.setWindowTitle(title)
@@ -641,22 +641,22 @@ def _detail_error_msg(self, title, error_text, error_detailed_text):
msg.setIcon(QMessageBox.Critical)
msg.setStandardButtons(QMessageBox.Ok)
msg.exec_()
-
-
- def _custom_input_dialog(self, ui, title, label,
- text_echo_mode=QLineEdit.Normal,
+
+
+ def _custom_input_dialog(self, ui, title, label,
+ text_echo_mode=QLineEdit.Normal,
input_mode=QInputDialog.TextInput):
- dlg = QInputDialog(ui)
+ dlg = QInputDialog(ui)
dlg.setTextEchoMode(text_echo_mode)
dlg.setInputMode(input_mode)
dlg.setWindowTitle(title)
- dlg.setLabelText(label)
- dlg.resize(250, 100)
- result = dlg.exec_()
+ dlg.setLabelText(label)
+ dlg.resize(250, 100)
+ result = dlg.exec_()
text = dlg.textValue()
return (text, result)
-
-
+
+
def _show_wallet_info(self):
wallet_rpc_request = self.ui.wallet_rpc_manager.rpc_request
wallet_info = {}
@@ -666,15 +666,15 @@ def _show_wallet_info(self):
balance, unlocked_balance, _ = wallet_rpc_request.get_balance()
wallet_info['balance'] = print_money(balance)
wallet_info['unlocked_balance'] = print_money(unlocked_balance)
-
+
self.on_new_wallet_show_info_event.emit(json.dumps(wallet_info))
-
-
+
+
on_new_wallet_show_info_event = Signal(str)
on_new_wallet_show_progress_event = Signal(str)
on_new_wallet_ui_reset_event = Signal()
on_new_wallet_update_processed_block_height_event = Signal(str)
-
+
on_daemon_update_status_event = Signal(str)
on_main_wallet_ui_reset_event = Signal()
on_wallet_update_info_event = Signal(str)
@@ -689,4 +689,4 @@ def _show_wallet_info(self):
on_load_app_settings_completed_event = Signal(str)
on_restart_daemon_completed_event = Signal()
on_paste_seed_words_event = Signal(str)
-
+
\ No newline at end of file
diff --git a/html/index.py b/html/index.py
index 8fbcc6e..a30e5af 100644
--- a/html/index.py
+++ b/html/index.py
@@ -17,11 +17,11 @@
-moz-box-sizing: border-box;
box-sizing: border-box;
}
-
+
body {
-webkit-user-select: none;
user-select: none;
-
+
cursor: default;
background-color: #fff;
color: #76A500;
@@ -34,21 +34,21 @@
height: 100%;
overflow: hidden;
}
-
+
a, a:hover, a:active, a:focus {
text-decoration: none;
outline: 0;
cursor: default;
}
-
+
a, a:active, a:focus{
color: #337AB7;
}
-
+
a:hover{
color: #fff;
}
-
+
.nav-tabs{
/*width: 760px;*/
}
@@ -57,176 +57,176 @@
text-align: center;
font-size: 120%
}
-
+
.container{
width: 760px;
padding: 0;
margin: 5px 0px 5px 20px;
}
-
+
h3{
text-align: center;
margin-bottom: 1em;
font-size: 180%;
}
-
-
+
+
.tab-content{
font-size: 12px;
}
-
+
.tab-content h3{
margin-top: 0;
}
-
+
#balance_tab h4, #balance_tab h5{
color: #76A500;
}
-
+
#balance_tab h5 span{
color: #ccc;
}
-
+
#settings_tab h3{
margin-top: 20px;
margin-bottom: 30px;
}
-
+
.syncing{
font-size: 60%;
}
-
- .tab-content .tab-pane {
+
+ .tab-content .tab-pane {
position: relative;
}
-
+
.form-horizontal .control-label{
text-align: left;
}
-
-
+
+
.progress{
height: 22px;
text-align: center;
background: #ddd;
}
-
+
#progress_bar_text_high{
- font-size: 90%;
+ font-size: 90%;
display: none;
}
-
+
#progress_bar_text_low{
font-size: 80%;
color: #c7254e;
}
-
+
.control-label{
font-weight: bold;
}
-
+
.tx-list{
color: #666;
margin-right: 20px;
font-weight: bold;
}
-
+
.tx-list a{
cursor: pointer;
}
-
+
.tx-list.tx-out, .tx-list.tx-in, .tx-list.tx-pool, .tx-list.tx-pending, .tx-list.tx-out a, .tx-list.tx-out a:active, .tx-list.tx-out a:focus{
color: #c7254e;
margin-bottom: 0;
}
-
+
.tx-list.tx-in, .tx-list.tx-in a, .tx-list.tx-in a:active, .tx-list.tx-in a:focus{
color: green;
}
-
+
.tx-list.tx-pool, .tx-list.tx-pending, .tx-list.tx-pending a, .tx-list.tx-pending a:active, .tx-list.tx-pending a:focus, .tx-list.tx-pool a, .tx-list.tx-pool a:active, .tx-list.tx-pool a:focus{
color: orange;
}
-
+
.tx-list a:hover{
color: #337AB7;
}
-
+
.tx-list.txid{
color: inherit;
}
-
+
.tx-list.tx-payment-id{
font-weight: normal;
}
-
+
.tx-fee-hide, .tx-note-hide, .tx-destinations-hide{
display: none;
}
-
+
.tx-list.tx-lock{
color: #666;
}
-
+
.modal-progress-text{
color: #333;
font-size: 90%;
font-weight: bold;
margin-left: 10px;
}
-
+
#form_receive input, #form_send_tx input, #form_send_tx select{
font-size: 14px;
}
-
+
.btn-sm{
border-radius: 0;
}
-
+
table {
border-spacing: 0;
border-collapse: collapse;
font-size: 12px;
}
-
+
table thead tr{
height: 3em;
}
-
+
table tbody tr {
color: #aaa;
height: 3em;
line-height: 1.6em;
}
-
+
table thead tr th{
text-align: left;
text-size: 18px;
padding: auto 1em;
}
-
+
table tbody tr td a:hover{
color: #666;
cursor: pointer;
}
-
+
.address-book-row{
cursor: pointer;
}
-
+
#address-book-box{
max-height: 450px;
}
-
+
#address-book-box table{
width: 100%;
}
-
+
#address-book-box table thead {
display: inline-block;
width: 100%;
}
-
+
#address-book-box table tbody {
border-top: none;
max-height: 300px;
@@ -234,7 +234,7 @@
width: 100%;
overflow: auto;
}
-
+
#address-book-box table tbody::-webkit-scrollbar-track,
.tx-destinations::-webkit-scrollbar-track
{
@@ -242,8 +242,8 @@
background-color: #F5F5F5;
border-radius: 6px;
}
-
-
+
+
#address-book-box table tbody::-webkit-scrollbar,
.tx-destinations::-webkit-scrollbar
{
@@ -251,11 +251,11 @@
background-color: #F5F5F5;
border-radius: 6px;
}
-
+
.tx-destinations::-webkit-scrollbar{
height: 8px;
}
-
+
#address-book-box table tbody::-webkit-scrollbar-thumb,
.tx-destinations::-webkit-scrollbar-thumb
{
@@ -263,35 +263,35 @@
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
background-color: #5BB0F7;
}
-
+
.tx-destinations {
width: 100%;
max-height: 200px;
overflow: auto;
font-size: 90%;
}
-
+
.wallet-settings{
text-align: center;
}
-
+
.wallet-settings button{
margin-left: 20px;
}
-
+
.form-control.address-box{
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
font-size: 85%;
color: #000;
}
-
+
textarea{
border:none;
width:100%;
resize:none;
font-weight:bold;
}
-
+
.panel-default>.panel-heading {
color: #666;
background-color: #eee;
@@ -302,12 +302,12 @@
-ms-user-select: none;
user-select: none;
}
-
+
.panel-default>.panel-heading a {
display: block;
padding: 10px 15px;
}
-
+
.panel-default>.panel-heading a:after {
font-family:'Glyphicons Halflings';
content: "";
@@ -323,62 +323,62 @@
transition: transform .25s linear;
-webkit-transition: -webkit-transform .25s linear;
}
-
+
.panel-default>.panel-heading a[aria-expanded="true"] {
background-color: #2196F3;
color: #fff;
font-weight: bold;
}
-
+
.panel-default>.panel-heading a[aria-expanded="false"] {
color: #666;
}
-
+
.panel-default>.panel-heading a[aria-expanded="true"]:after {
content:"\e114";
-
+
}
-
+
.panel-default>.panel-heading a[aria-expanded="false"]:after {
content:"\e080";
}
-
+
.panel-default > .panel-heading + .panel-collapse > .panel-body {
height: 295px;
overflow: auto;
}
-
-
+
+
.panel-default > .panel-heading + .panel-collapse > .panel-body::-webkit-scrollbar-track
{
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
border-radius: 6px;
background-color: #F5F5F5;
}
-
-
+
+
.panel-default > .panel-heading + .panel-collapse > .panel-body::-webkit-scrollbar
{
width: 8px;
background-color: #F5F5F5;
}
-
+
.panel-default > .panel-heading + .panel-collapse > .panel-body::-webkit-scrollbar-thumb
{
border-radius: 6px;
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
background-color: #5BB0F7;
}
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+