From 585825c73f94e340d6d6ac89933954bdc520b640 Mon Sep 17 00:00:00 2001 From: cryptonotefoundation Date: Wed, 29 Apr 2015 21:21:22 +0300 Subject: [PATCH 1/2] Add README.md --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 000000000..681feba5e --- /dev/null +++ b/README.md @@ -0,0 +1,33 @@ +**1. Clone wallet sources** + +``` +git clone https://github.com/cryptonotefoundation/cryptonotewallet.git +``` + +**2. Modify `CryptoNoteWallet.cmake`** + +``` +set(CN_PROJECT_NAME "furiouscoin") +set(CN_CURRENCY_DISPLAY_NAME "FuriousCoin") +set(CN_CURRENCY_TICKER "XFC") +``` + +**3. Set symbolic link to coin sources at the same level as `src`. For example:** + +``` +ln -s ../cryptonote cryptonote +``` + +Alternative way is to create git submodule: + +``` +git submodule add https://github.com/cryptonotefoundation/cryptonote.git cryptonote +``` + +Replace URL with git remote repository of your coin. + +**4. Build** + +``` +mkdir build && cmake .. && make +``` From 5a886fd7f45d67669d36fc9542e15ea3d0290018 Mon Sep 17 00:00:00 2001 From: cryptonotefoundation Date: Thu, 30 Apr 2015 15:11:48 +0300 Subject: [PATCH 2/2] Improve CryptoNoteCoin settings usage --- README.md | 2 +- src/CommandLineParser.cpp | 1 - src/CommandLineParser.h | 1 - src/CryptoNote.cpp | 1 - src/CryptoNote.h | 1 - src/CurrencyAdapter.cpp | 5 +- src/CurrencyAdapter.h | 2 +- src/NodeAdapter.cpp | 4 +- src/NodeAdapter.h | 1 - src/Settings.cpp | 1 - src/Settings.h | 1 - src/SignalHandler.cpp | 1 - src/SignalHandler.h | 1 - src/WalletAdapter.cpp | 1 - src/WalletAdapter.h | 1 - src/gui/AboutDialog.cpp | 1 - src/gui/AboutDialog.h | 1 - src/gui/AddressBookDialog.cpp | 1 - src/gui/AddressBookDialog.h | 1 - src/gui/AddressBookFrame.cpp | 1 - src/gui/AddressBookFrame.h | 1 - src/gui/AddressBookModel.cpp | 1 - src/gui/AddressBookModel.h | 1 - src/gui/AnimatedLabel.cpp | 1 - src/gui/AnimatedLabel.h | 1 - src/gui/ChangePasswordDialog.cpp | 1 - src/gui/ChangePasswordDialog.h | 1 - src/gui/ExitWidget.cpp | 1 - src/gui/ExitWidget.h | 1 - src/gui/MainWindow.cpp | 1 - src/gui/MainWindow.h | 1 - src/gui/MainWindow.mm | 1 - src/gui/NewAddressDialog.cpp | 1 - src/gui/NewAddressDialog.h | 1 - src/gui/NewPasswordDialog.cpp | 1 - src/gui/NewPasswordDialog.h | 1 - src/gui/OverviewFrame.cpp | 1 - src/gui/OverviewFrame.h | 1 - src/gui/PasswordDialog.cpp | 1 - src/gui/PasswordDialog.h | 1 - src/gui/ReceiveFrame.cpp | 1 - src/gui/ReceiveFrame.h | 1 - src/gui/RecentTransactionsModel.cpp | 1 - src/gui/RecentTransactionsModel.h | 1 - src/gui/SendFrame.cpp | 22 ++++---- src/gui/SendFrame.h | 3 +- src/gui/SortedTransactionsModel.cpp | 1 - src/gui/SortedTransactionsModel.h | 1 - src/gui/TransactionDetailsDialog.cpp | 1 - src/gui/TransactionDetailsDialog.h | 1 - src/gui/TransactionFrame.cpp | 1 - src/gui/TransactionFrame.h | 1 - src/gui/TransactionsFrame.cpp | 1 - src/gui/TransactionsFrame.h | 1 - src/gui/TransactionsListModel.cpp | 1 - src/gui/TransactionsListModel.h | 1 - src/gui/TransactionsModel.cpp | 1 - src/gui/TransactionsModel.h | 1 - src/gui/TransferFrame.cpp | 1 - src/gui/TransferFrame.h | 1 - src/gui/WalletEvents.h | 1 - src/gui/ui/sendframe.ui | 78 ++++++++++++++-------------- src/main.cpp | 1 - 63 files changed, 56 insertions(+), 116 deletions(-) diff --git a/README.md b/README.md index 681feba5e..a3d153cb2 100644 --- a/README.md +++ b/README.md @@ -29,5 +29,5 @@ Replace URL with git remote repository of your coin. **4. Build** ``` -mkdir build && cmake .. && make +mkdir build && cd build && cmake .. && make ``` diff --git a/src/CommandLineParser.cpp b/src/CommandLineParser.cpp index 817e314e9..e2bbb7274 100644 --- a/src/CommandLineParser.cpp +++ b/src/CommandLineParser.cpp @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #include #include diff --git a/src/CommandLineParser.h b/src/CommandLineParser.h index e6930e289..cbc2ebbcd 100644 --- a/src/CommandLineParser.h +++ b/src/CommandLineParser.h @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #pragma once #include diff --git a/src/CryptoNote.cpp b/src/CryptoNote.cpp index 440fb7af0..f3590ac2b 100644 --- a/src/CryptoNote.cpp +++ b/src/CryptoNote.cpp @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #include "CryptoNote.h" #include "cryptonote_core/cryptonote_basic_impl.h" #include "cryptonote_core/cryptonote_format_utils.h" diff --git a/src/CryptoNote.h b/src/CryptoNote.h index ee3acdc0d..bcf452cc8 100644 --- a/src/CryptoNote.h +++ b/src/CryptoNote.h @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #pragma once #include diff --git a/src/CurrencyAdapter.cpp b/src/CurrencyAdapter.cpp index 26d051477..49c532692 100644 --- a/src/CurrencyAdapter.cpp +++ b/src/CurrencyAdapter.cpp @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #include "CurrencyAdapter.h" #include "CryptoNoteWalletConfig.h" @@ -39,6 +38,10 @@ QString CurrencyAdapter::getCurrencyTicker() const { return WALLET_CURRENCY_TICKER; } +quint64 CurrencyAdapter::getMinimumFee() const { + return m_currency.minimumFee(); +} + QString CurrencyAdapter::formatAmount(quint64 _amount) const { QString result = QString::number(_amount); if (result.length() < getNumberOfDecimalPlaces() + 1) { diff --git a/src/CurrencyAdapter.h b/src/CurrencyAdapter.h index 3f9a720b0..57dbef496 100644 --- a/src/CurrencyAdapter.h +++ b/src/CurrencyAdapter.h @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #pragma once #include @@ -20,6 +19,7 @@ class CurrencyAdapter { QString getCurrencyDisplayName() const; QString getCurrencyName() const; QString getCurrencyTicker() const; + quint64 getMinimumFee() const; quintptr getNumberOfDecimalPlaces() const; QString formatAmount(quint64 _amount) const; quint64 parseAmount(const QString& _amountString) const; diff --git a/src/NodeAdapter.cpp b/src/NodeAdapter.cpp index 1f14ab8c3..2df069e23 100644 --- a/src/NodeAdapter.cpp +++ b/src/NodeAdapter.cpp @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #include #include #include @@ -111,8 +110,7 @@ CryptoNote::IWallet* NodeAdapter::createWallet() const { bool NodeAdapter::init() { Q_ASSERT(m_node == nullptr); - // TODO Insert the right URL for the local daemon - QUrl localNodeUrl = QUrl::fromUserInput(""); + QUrl localNodeUrl = QUrl::fromUserInput(QString("127.0.0.1:%1").arg(cryptonote::RPC_DEFAULT_PORT)); m_node = createRpcNode(CurrencyAdapter::instance().getCurrency(), *this, localNodeUrl.host().toStdString(), localNodeUrl.port()); diff --git a/src/NodeAdapter.h b/src/NodeAdapter.h index 18467a4db..d344d335a 100644 --- a/src/NodeAdapter.h +++ b/src/NodeAdapter.h @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #pragma once #include diff --git a/src/Settings.cpp b/src/Settings.cpp index 547047b47..3bb8308f9 100644 --- a/src/Settings.cpp +++ b/src/Settings.cpp @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #include #include #include diff --git a/src/Settings.h b/src/Settings.h index 20ffe4dbe..5e6c5c9e4 100644 --- a/src/Settings.h +++ b/src/Settings.h @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #pragma once #include diff --git a/src/SignalHandler.cpp b/src/SignalHandler.cpp index 445250ffa..1a1f96cc5 100644 --- a/src/SignalHandler.cpp +++ b/src/SignalHandler.cpp @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #include #include "SignalHandler.h" diff --git a/src/SignalHandler.h b/src/SignalHandler.h index fac3966ce..959fae75d 100644 --- a/src/SignalHandler.h +++ b/src/SignalHandler.h @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #pragma once #include diff --git a/src/WalletAdapter.cpp b/src/WalletAdapter.cpp index 436e2cd4d..316c3b918 100644 --- a/src/WalletAdapter.cpp +++ b/src/WalletAdapter.cpp @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #include #include #include diff --git a/src/WalletAdapter.h b/src/WalletAdapter.h index 615f81965..43bde8cfb 100644 --- a/src/WalletAdapter.h +++ b/src/WalletAdapter.h @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #pragma once #include diff --git a/src/gui/AboutDialog.cpp b/src/gui/AboutDialog.cpp index 1e3418e59..db311030d 100644 --- a/src/gui/AboutDialog.cpp +++ b/src/gui/AboutDialog.cpp @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #include "AboutDialog.h" #include "CurrencyAdapter.h" #include "Settings.h" diff --git a/src/gui/AboutDialog.h b/src/gui/AboutDialog.h index fdb9775a0..3523d939c 100644 --- a/src/gui/AboutDialog.h +++ b/src/gui/AboutDialog.h @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #pragma once #include diff --git a/src/gui/AddressBookDialog.cpp b/src/gui/AddressBookDialog.cpp index 71c66b37f..cef815ddd 100644 --- a/src/gui/AddressBookDialog.cpp +++ b/src/gui/AddressBookDialog.cpp @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #include "AddressBookDialog.h" #include "AddressBookModel.h" diff --git a/src/gui/AddressBookDialog.h b/src/gui/AddressBookDialog.h index d9aba9f04..915dba693 100644 --- a/src/gui/AddressBookDialog.h +++ b/src/gui/AddressBookDialog.h @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #pragma once #include diff --git a/src/gui/AddressBookFrame.cpp b/src/gui/AddressBookFrame.cpp index ca612aa55..4b3d2c5de 100644 --- a/src/gui/AddressBookFrame.cpp +++ b/src/gui/AddressBookFrame.cpp @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #include #include diff --git a/src/gui/AddressBookFrame.h b/src/gui/AddressBookFrame.h index 444d73357..2e6c4112b 100644 --- a/src/gui/AddressBookFrame.h +++ b/src/gui/AddressBookFrame.h @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #pragma once #include diff --git a/src/gui/AddressBookModel.cpp b/src/gui/AddressBookModel.cpp index 7f9d45702..93c6a4605 100644 --- a/src/gui/AddressBookModel.cpp +++ b/src/gui/AddressBookModel.cpp @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #include #include #include diff --git a/src/gui/AddressBookModel.h b/src/gui/AddressBookModel.h index a07a3abb9..9d21903d5 100644 --- a/src/gui/AddressBookModel.h +++ b/src/gui/AddressBookModel.h @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #pragma once #include diff --git a/src/gui/AnimatedLabel.cpp b/src/gui/AnimatedLabel.cpp index 88b919fde..3c8cdd15d 100644 --- a/src/gui/AnimatedLabel.cpp +++ b/src/gui/AnimatedLabel.cpp @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #include "AnimatedLabel.h" namespace WalletGui { diff --git a/src/gui/AnimatedLabel.h b/src/gui/AnimatedLabel.h index 42bd6428d..3636ff322 100644 --- a/src/gui/AnimatedLabel.h +++ b/src/gui/AnimatedLabel.h @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #pragma once #include diff --git a/src/gui/ChangePasswordDialog.cpp b/src/gui/ChangePasswordDialog.cpp index a4267e0fd..a9564529c 100644 --- a/src/gui/ChangePasswordDialog.cpp +++ b/src/gui/ChangePasswordDialog.cpp @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #include "ChangePasswordDialog.h" #include "ui_changepassworddialog.h" diff --git a/src/gui/ChangePasswordDialog.h b/src/gui/ChangePasswordDialog.h index 8e83d41db..1bf3291ac 100644 --- a/src/gui/ChangePasswordDialog.h +++ b/src/gui/ChangePasswordDialog.h @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #pragma once #include diff --git a/src/gui/ExitWidget.cpp b/src/gui/ExitWidget.cpp index 63959054b..5777b51ad 100644 --- a/src/gui/ExitWidget.cpp +++ b/src/gui/ExitWidget.cpp @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #include #include "CurrencyAdapter.h" diff --git a/src/gui/ExitWidget.h b/src/gui/ExitWidget.h index dbe75b2d6..88cf1d61a 100644 --- a/src/gui/ExitWidget.h +++ b/src/gui/ExitWidget.h @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #pragma once #include diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index 0bbb18f8a..8ff81ad2d 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #include #include #include diff --git a/src/gui/MainWindow.h b/src/gui/MainWindow.h index 0ae557466..50178e43c 100644 --- a/src/gui/MainWindow.h +++ b/src/gui/MainWindow.h @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #pragma once #include diff --git a/src/gui/MainWindow.mm b/src/gui/MainWindow.mm index 146ff6eb7..68e088caa 100644 --- a/src/gui/MainWindow.mm +++ b/src/gui/MainWindow.mm @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #import #import diff --git a/src/gui/NewAddressDialog.cpp b/src/gui/NewAddressDialog.cpp index 084d5cb92..f96498867 100644 --- a/src/gui/NewAddressDialog.cpp +++ b/src/gui/NewAddressDialog.cpp @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #include "NewAddressDialog.h" #include "ui_newaddressdialog.h" diff --git a/src/gui/NewAddressDialog.h b/src/gui/NewAddressDialog.h index 152c37777..a0f10d54d 100644 --- a/src/gui/NewAddressDialog.h +++ b/src/gui/NewAddressDialog.h @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #pragma once #include diff --git a/src/gui/NewPasswordDialog.cpp b/src/gui/NewPasswordDialog.cpp index f1693018f..3197b3cc2 100644 --- a/src/gui/NewPasswordDialog.cpp +++ b/src/gui/NewPasswordDialog.cpp @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #include "NewPasswordDialog.h" #include "ui_newpassworddialog.h" diff --git a/src/gui/NewPasswordDialog.h b/src/gui/NewPasswordDialog.h index f84e907cc..e9428b510 100644 --- a/src/gui/NewPasswordDialog.h +++ b/src/gui/NewPasswordDialog.h @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #pragma once #include diff --git a/src/gui/OverviewFrame.cpp b/src/gui/OverviewFrame.cpp index 0141677cb..dba280b26 100644 --- a/src/gui/OverviewFrame.cpp +++ b/src/gui/OverviewFrame.cpp @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #include "CurrencyAdapter.h" #include "OverviewFrame.h" #include "TransactionFrame.h" diff --git a/src/gui/OverviewFrame.h b/src/gui/OverviewFrame.h index e44456b13..aeb12c4b1 100644 --- a/src/gui/OverviewFrame.h +++ b/src/gui/OverviewFrame.h @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #pragma once #include diff --git a/src/gui/PasswordDialog.cpp b/src/gui/PasswordDialog.cpp index bd1d982fb..a4a52368b 100644 --- a/src/gui/PasswordDialog.cpp +++ b/src/gui/PasswordDialog.cpp @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #include "PasswordDialog.h" #include "ui_passworddialog.h" diff --git a/src/gui/PasswordDialog.h b/src/gui/PasswordDialog.h index ee2c68c54..7480f26a8 100644 --- a/src/gui/PasswordDialog.h +++ b/src/gui/PasswordDialog.h @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #pragma once #include diff --git a/src/gui/ReceiveFrame.cpp b/src/gui/ReceiveFrame.cpp index b167ccad0..20d18b30e 100644 --- a/src/gui/ReceiveFrame.cpp +++ b/src/gui/ReceiveFrame.cpp @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #include #include "ReceiveFrame.h" diff --git a/src/gui/ReceiveFrame.h b/src/gui/ReceiveFrame.h index c407acffd..b9a3386e8 100644 --- a/src/gui/ReceiveFrame.h +++ b/src/gui/ReceiveFrame.h @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #pragma once #include diff --git a/src/gui/RecentTransactionsModel.cpp b/src/gui/RecentTransactionsModel.cpp index 1a0992c4f..fc42acca2 100644 --- a/src/gui/RecentTransactionsModel.cpp +++ b/src/gui/RecentTransactionsModel.cpp @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #include "RecentTransactionsModel.h" #include "SortedTransactionsModel.h" diff --git a/src/gui/RecentTransactionsModel.h b/src/gui/RecentTransactionsModel.h index 7a86ccab9..6d8bf9d91 100644 --- a/src/gui/RecentTransactionsModel.h +++ b/src/gui/RecentTransactionsModel.h @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #pragma once #include diff --git a/src/gui/SendFrame.cpp b/src/gui/SendFrame.cpp index 9ac69ad53..499898cb8 100644 --- a/src/gui/SendFrame.cpp +++ b/src/gui/SendFrame.cpp @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #include "AddressBookModel.h" #include "CurrencyAdapter.h" #include "MainWindow.h" @@ -16,8 +15,6 @@ namespace WalletGui { -const quint64 MINIMAL_FEE = 1000000; - SendFrame::SendFrame(QWidget* _parent) : QFrame(_parent), m_ui(new Ui::SendFrame) { m_ui->setupUi(this); clearAllClicked(); @@ -85,12 +82,7 @@ void SendFrame::sendClicked() { } } - quint64 fee = MINIMAL_FEE; - if (fee < MINIMAL_FEE) { - QCoreApplication::postEvent(&MainWindow::instance(), new ShowMessageEvent(tr("Minimum allowed fee is 0.01"), QtCriticalMsg)); - return; - } - + quint64 fee = CurrencyAdapter::instance().getMinimumFee(); if (WalletAdapter::instance().isOpen()) { WalletAdapter::instance().sendTransaction(walletTransfers, fee, m_ui->m_paymentIdEdit->text(), m_ui->m_mixinSlider->value()); } @@ -100,11 +92,15 @@ void SendFrame::mixinValueChanged(int _value) { m_ui->m_mixinEdit->setText(QString::number(_value)); } -void SendFrame::sendTransactionCompleted(CryptoNote::TransactionId _id, bool _result, const QString& _errorText) { +void SendFrame::sendTransactionCompleted(CryptoNote::TransactionId _id, bool _error, const QString& _errorText) { Q_UNUSED(_id); - Q_UNUSED(_result); - Q_UNUSED(_errorText); - clearAllClicked(); + if (_error) { + QCoreApplication::postEvent( + &MainWindow::instance(), + new ShowMessageEvent(_errorText, QtCriticalMsg)); + } else { + clearAllClicked(); + } } void SendFrame::walletActualBalanceUpdated(quint64 _balance) { diff --git a/src/gui/SendFrame.h b/src/gui/SendFrame.h index eceac9841..83692eb34 100644 --- a/src/gui/SendFrame.h +++ b/src/gui/SendFrame.h @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #pragma once #include @@ -29,7 +28,7 @@ class SendFrame : public QFrame { QScopedPointer m_ui; QList m_transfers; - void sendTransactionCompleted(CryptoNote::TransactionId _id, bool _result, const QString& _error_text); + void sendTransactionCompleted(CryptoNote::TransactionId _id, bool _error, const QString& _error_text); void walletActualBalanceUpdated(quint64 _balance); Q_SLOT void addRecipientClicked(); diff --git a/src/gui/SortedTransactionsModel.cpp b/src/gui/SortedTransactionsModel.cpp index 47fe8562b..62e291a25 100644 --- a/src/gui/SortedTransactionsModel.cpp +++ b/src/gui/SortedTransactionsModel.cpp @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #include #include "SortedTransactionsModel.h" diff --git a/src/gui/SortedTransactionsModel.h b/src/gui/SortedTransactionsModel.h index bd468831d..15722b8b5 100644 --- a/src/gui/SortedTransactionsModel.h +++ b/src/gui/SortedTransactionsModel.h @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #pragma once #include diff --git a/src/gui/TransactionDetailsDialog.cpp b/src/gui/TransactionDetailsDialog.cpp index e3c3313b4..af3d2f60b 100644 --- a/src/gui/TransactionDetailsDialog.cpp +++ b/src/gui/TransactionDetailsDialog.cpp @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #include #include "CurrencyAdapter.h" diff --git a/src/gui/TransactionDetailsDialog.h b/src/gui/TransactionDetailsDialog.h index 0d116bb68..63e53ffb2 100644 --- a/src/gui/TransactionDetailsDialog.h +++ b/src/gui/TransactionDetailsDialog.h @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #pragma once #include diff --git a/src/gui/TransactionFrame.cpp b/src/gui/TransactionFrame.cpp index 3cf53eda6..4b719a632 100644 --- a/src/gui/TransactionFrame.cpp +++ b/src/gui/TransactionFrame.cpp @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #include #include "MainWindow.h" diff --git a/src/gui/TransactionFrame.h b/src/gui/TransactionFrame.h index ba5a97189..9b414d510 100644 --- a/src/gui/TransactionFrame.h +++ b/src/gui/TransactionFrame.h @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #pragma once #include diff --git a/src/gui/TransactionsFrame.cpp b/src/gui/TransactionsFrame.cpp index 97a533d8a..708402a18 100644 --- a/src/gui/TransactionsFrame.cpp +++ b/src/gui/TransactionsFrame.cpp @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #include #include diff --git a/src/gui/TransactionsFrame.h b/src/gui/TransactionsFrame.h index 7bbbdddd8..59da75384 100644 --- a/src/gui/TransactionsFrame.h +++ b/src/gui/TransactionsFrame.h @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #pragma once #include diff --git a/src/gui/TransactionsListModel.cpp b/src/gui/TransactionsListModel.cpp index 1921a17cb..56635ba0e 100644 --- a/src/gui/TransactionsListModel.cpp +++ b/src/gui/TransactionsListModel.cpp @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #include "SortedTransactionsModel.h" #include "TransactionsListModel.h" #include "TransactionsModel.h" diff --git a/src/gui/TransactionsListModel.h b/src/gui/TransactionsListModel.h index ead5f021b..ea7fc3b52 100644 --- a/src/gui/TransactionsListModel.h +++ b/src/gui/TransactionsListModel.h @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #pragma once #include diff --git a/src/gui/TransactionsModel.cpp b/src/gui/TransactionsModel.cpp index a0dc94eb9..95ba54d98 100644 --- a/src/gui/TransactionsModel.cpp +++ b/src/gui/TransactionsModel.cpp @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #include #include #include diff --git a/src/gui/TransactionsModel.h b/src/gui/TransactionsModel.h index 883e9ea27..9c117b05c 100644 --- a/src/gui/TransactionsModel.h +++ b/src/gui/TransactionsModel.h @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #pragma once #include diff --git a/src/gui/TransferFrame.cpp b/src/gui/TransferFrame.cpp index a19dc2457..54c562a79 100644 --- a/src/gui/TransferFrame.cpp +++ b/src/gui/TransferFrame.cpp @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #include #include diff --git a/src/gui/TransferFrame.h b/src/gui/TransferFrame.h index e6bee517e..22bd5bfad 100644 --- a/src/gui/TransferFrame.h +++ b/src/gui/TransferFrame.h @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #pragma once #include diff --git a/src/gui/WalletEvents.h b/src/gui/WalletEvents.h index 4e55a7809..7a71774ad 100644 --- a/src/gui/WalletEvents.h +++ b/src/gui/WalletEvents.h @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #pragma once #include diff --git a/src/gui/ui/sendframe.ui b/src/gui/ui/sendframe.ui index 69040c6a1..b2465a70c 100644 --- a/src/gui/ui/sendframe.ui +++ b/src/gui/ui/sendframe.ui @@ -72,34 +72,35 @@ 5 - - + + - 200 + 30 16777215 - - 10 - - - 1 - - - 2 + + - - false + + 5 - - Qt::Horizontal + + Qt::AlignCenter - - QSlider::TicksBothSides + + true - - 1 + + + + + + + + + Anonimity level: @@ -126,35 +127,34 @@ - - + + - 30 + 200 16777215 - - + + 10 - - 5 + + 1 - - Qt::AlignCenter + + 1 - - true + + false - - - - - - - - - Anonimity level: + + Qt::Horizontal + + + QSlider::TicksBothSides + + + 1 diff --git a/src/main.cpp b/src/main.cpp index bf49ad9d1..f29e932aa 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2,7 +2,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - #include #include #include