diff --git a/doc/Perpetual-Futures-contracts-and-Leverage-Margin-trading.md b/doc/Perpetual-Futures-contracts-and-Leverage-Margin-trading.md new file mode 100644 index 00000000..7cd31753 --- /dev/null +++ b/doc/Perpetual-Futures-contracts-and-Leverage-Margin-trading.md @@ -0,0 +1,106 @@ +![LUX Logo](../src/qt/res/images/lux_logo_horizontal.png) + +"FIRST OF ITS KIND" + +Luxcore is GNU AGPLv3 licensed. + +LUXGATE Perpetual & Futures contracts - Leverage & Margin trading. +================================================================== + +Luxgate is a decentralized exchange, so all orders will be listed on LUX explorer and all transactions are stored in the LUX blockchain. + +## Perpetual & Futures contracts. + +Futures are a derivative tool or agreement to buy or sell a primary asset at a predetermined price at a specified time in the future. With Luxgate you can trade using the futures contracts that cannot be delivered, which means that the difference between the perpetual contracts price and the spot price will be automatically calculated at the time specified in the contract. + +## Leverage & Margin trading. + +Financial leverage is the expression of the level of loan use in the total capital of the enterprise to increase the rate of equity return (ROE) or the income per ordinary share of the company. + +Financial leverage refers to the combination of liabilities and owners' equity in regulating corporate financial policies. Financial leverage will be considerable in businesses with a higher proportion of liabilities than equity. Conversely, financial leverage will be low when the proportion of liabilities is smaller than the proportion of equity. + +Financial leverage is both a tool to promote after-tax profits on an owner's equity and a tool to curb that increase. High profitability is the desire of the owners, in which financial leverage is a tool used by managers. + + +* Below is a basic example of using leverage, also known as simple leverage. + + + A and B are currently trading LUX/USD in their locality. + + A used the amount of USD 100,000,000 to buy 10 LUX for USD 10,000,000 / LUX. The total amount A currently uses is 100,000,000 USD. He only uses his existing capital to do business without using financial leverage, not borrowing more. + + B also used the capital of USD 100,000,000 and borrowed more than USD 50,000,000 to buy 15 LUX for USD 10,000,000 / LUX. The total amount B currently uses is 150,000,000 USD. Currently, B borrowed more money from his friends, which is B's use of financial leverage. B is controlling 15 LUX with only USD 100,000,000. + + If LUX is favorable, the total ROE value of B and A increases by 25%, they sell then: + + * A profit USD 100,000,000 x 0.25 = USD 25,000,000, from the initial capital of USD 100,000,000. 25% profit + + * B earns USD 150,000,000 x 0.25 = USD 37,500,000, from it initial capital of USD 100,000,000. Profit of 37.5%. + + If LUX is unstable, the total ROE value of B and A decreases by 10%, they sell then: + + * A lost USD 100,000,000 x 10% = USD 10,000,000. Damage 10% of it capital. + + * B lost USD 150,000,000 x 10% = USD 15,000,000. Damage 15% of it capital. + + Through this, we see that when using financial leverage effectively, the profit margin is much higher than not using financial leverage. But it is also necessary to carefully consider the business plans to minimize the risks that lead to losses. + + +* Formula to calculate financial leverage + + DFL = (% change in EPS) / (% change in EBIT) + + DFL is a leverage ratio that shows the effect of a specific debt on the company's earnings per share. + +* Leverage + +Luxgate offers leverage on operations with derivatives with the maximum of `x100 leverage`. `Note: high leverage increases trading risks`. + +* Masternode Collateral System & Open Position + +To open a position, you need to have a sufficient initial margin level which is holding by our `masternode collateral` function. It is a 100% `decentralised collateral system` that Luxcore specially implemented to serves as collateral for your order. It is calculated in proportion to the leverage you choose. + +Example: + + Initial margin for leverage x2 is 50% of the order amount; initial margin for leverage x10 is 10% of the order amount; for leverage x 25 you need to deposit only 4% of the order amount. After your order is executed, 30% of the initial margin will be transferred to you Margin Balance. This amount will be automatically used to maintain your positions, or you can use it to place new orders or transfer it to your account. + +* Liquidation + +You need to have a sufficient level of maintenance margin balance for your current position, otherwise, your position will be liquidated + + 70% of the initial margin for your postion + + Margin Balance, including 30% of the initial margin for your position + + If your position exceeds maintenance margin, it will be liquidated. + +* Cross Margin + +Luxgate also has cross margin method. This means that the maintenance margin of your Margin Balance will be shared among all your open positions. Therefore, when a trader has several open positions, the maintenance margin also includes: + + Unrealized positive PNL on all open positions + +Example: + + (.....) + +### Margin Balance + +Margin balances are designed to maintain existing positions with leverage. Margin balances automatically maintain positions close to liquidation. + +### Liquidation Process + +If your total balance is not enough to maintain your position, they can be liquidated. The Fair price marking system is used to calculate the liquidation price. It allows avoiding spurious liquidation when price exceptions occur due to market manipulation. If traders cannot meet their maintenance requirements, they will be liquidated. + +### Fees + +To record information about opening an order and add information about a completed transaction to the LUX blockchain, you need to spend a particular amount of TX fee. + + +* Luxgate fees, Makers and Takers fees. + + Fee for makers is 0% + blockchain fee (TX fee) for placing an order. + + Fee for takers is 0,1% + blockchain fee (TX fee) for placing an order. + + TX fee is used for all the transaction within the LUX blockchain system. diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include index 623177ed..0a729ec8 100755 --- a/src/Makefile.qt.include +++ b/src/Makefile.qt.include @@ -55,7 +55,6 @@ QT_FORMS_UI = \ qt/forms/openuridialog.ui \ qt/forms/optionsdialog.ui \ qt/forms/overviewpage.ui \ - qt/forms/tradingdialog.ui \ qt/forms/receivecoinsdialog.ui \ qt/forms/receivetokenpage.ui \ qt/forms/receiverequestdialog.ui \ @@ -123,7 +122,6 @@ QT_MOC_CPP = \ qt/moc_optionsdialog.cpp \ qt/moc_optionsmodel.cpp \ qt/moc_overviewpage.cpp \ - qt/moc_tradingdialog.cpp \ qt/moc_tokenamountfield.cpp \ qt/moc_qcustomplot.cpp \ qt/moc_peertablemodel.cpp \ @@ -252,7 +250,6 @@ BITCOIN_QT_H = \ qt/optionsdialog.h \ qt/optionsmodel.h \ qt/overviewpage.h \ - qt/tradingdialog.h \ qt/paymentrequestplus.h \ qt/paymentserver.h \ qt/peertablemodel.h \ @@ -376,7 +373,6 @@ RES_ICONS = \ qt/res/icons/staking_inactive.png \ qt/res/icons/synced.png \ qt/res/icons/stake.png \ - qt/res/icons/trade.png \ qt/res/icons/transaction0.png \ qt/res/icons/transaction2.png \ qt/res/icons/transaction_abandoned.png \ @@ -472,7 +468,6 @@ BITCOIN_QT_CPP += \ qt/openuridialog.cpp \ qt/overviewpage.cpp \ qt/qcustomplot.cpp \ - qt/tradingdialog.cpp \ qt/paymentrequestplus.cpp \ qt/paymentserver.cpp \ qt/lsrtoken.cpp \ diff --git a/src/darksend.cpp b/src/darksend.cpp index 7b13e3bc..09b4239f 100644 --- a/src/darksend.cpp +++ b/src/darksend.cpp @@ -411,6 +411,7 @@ int randomizeList(int i) { return std::rand() % i; } // Recursively determine the rounds of a given input (How deep is the darksend chain for a given input) int GetInputDarksendRounds(CTxIn in, int rounds) { if (rounds >= 17) return rounds; + if (rounds > nDarksendRounds || nDarksendRounds <= 0 || !fEnableDarksend) return rounds; // once we hit the max rounds setting, there's no point going further back (this func is only used for selecting qualifying txs) std::string padding = ""; padding.insert(0, ((rounds + 1) * 5) + 3, ' '); @@ -2114,41 +2115,12 @@ void ThreadCheckDarkSendPool() { darkSendPool.CheckTimeout(); if (c % 60 == 0) { -// LOCK(cs_main); - /* - cs_main is required for doing masternode.Check because something - is modifying the coins view without a mempool lock. It causes - segfaults from this code without the cs_main lock. - */ - { - + { LOCK(cs_masternodes); vector::iterator it = vecMasternodes.begin(); //check them separately while (it != vecMasternodes.end()) { (*it).Check(); - ++it; - } - - int count = vecMasternodes.size(); - int i = 0; - - for (CMasterNode mn : vecMasternodes) { - - if (mn.addr.IsRFC1918()) continue; //local network - if (mn.IsEnabled()) { - if (fDebug) LogPrintf("Sending masternode entry - %s \n", mn.addr.ToString().c_str()); - for (CNode * pnode : vNodes) { - if (pnode) - pnode->PushMessage("dsee", mn.vin, mn.addr, mn.sig, mn.now, mn.pubkey, mn.pubkey2, count, i, mn.lastTimeSeen, mn.protocolVersion); - } - } - i++; - } - - //remove inactive - it = vecMasternodes.begin(); - while (it != vecMasternodes.end()) { if ((*it).enabled == 4 || (*it).enabled == 3) { LogPrintf("Removing inactive masternode %s\n", (*it).addr.ToString().c_str()); it = vecMasternodes.erase(it); @@ -2156,15 +2128,13 @@ void ThreadCheckDarkSendPool() { ++it; } } - } - masternodePayments.CleanPaymentList(); CleanTransactionLocksList(); } - //try to sync the masternode list and payment list every 5 seconds from at least 3 nodes - if (c % 5 == 0 && RequestedMasterNodeList < 3) { + //try to sync the masternode list and payment list every 5 seconds from at least 5 nodes + if (c % 5 == 0 && RequestedMasterNodeList < 5) { bool fIsInitialDownload = IsInitialBlockDownload(); if (!fIsInitialDownload) { LOCK(cs_vNodes); diff --git a/src/init.cpp b/src/init.cpp index 5cecd929..2a3f0f10 100755 --- a/src/init.cpp +++ b/src/init.cpp @@ -821,6 +821,7 @@ bool AppInit2() fPrintToConsole = GetBoolArg("-printtoconsole", false); fLogTimestamps = GetBoolArg("-logtimestamps", true); fLogIPs = GetBoolArg("-logips", false); + int nIndexNum; if (mapArgs.count("-bind") || mapArgs.count("-whitebind")) { // when specifying an explicit binding address, you want to listen on it @@ -919,8 +920,27 @@ bool AppInit2() nMaxConnections = nFD - MIN_CORE_FILEDESCRIPTORS; if (GetArg("-prune", 0)) { - if (GetBoolArg("-txindex", DEFAULT_TXINDEX)) - return InitError(_("Prune mode is incompatible with -txindex.")); + std::string strLoadError; + if (GetBoolArg("-txindex", DEFAULT_TXINDEX)) { + strLoadError = _("You need to add txindex=0 to start pruning"); + bool fRetPrune = uiInterface.ThreadSafeQuestion( + strLoadError + ".\n\n" + _("Do you want to add automatically add it to the configuration file and close the wallet?"), + strLoadError + ".\nPlease restart with txindex=0 to prune.", + "", CClientUIInterface::MSG_ERROR | CClientUIInterface::BTN_ABORT); + if (fRetPrune){ + nIndexNum = 0; + WriteConfigToFile("txindex", std::to_string(nIndexNum)); + fReindex = true; + fRequestRestart = true; + } else { + LogPrintf("Aborted configuration changes. Exiting.\n"); + return false; + } + } + } + if (fRequestRestart) { + LogPrintf("Restart requested. Exiting.\n"); + return false; } // ********************************************************* Step 3: parameter-to-internal-flags diff --git a/src/lux-cli.cpp b/src/lux-cli.cpp index 1e6a04d7..0cd62c22 100755 --- a/src/lux-cli.cpp +++ b/src/lux-cli.cpp @@ -260,7 +260,7 @@ int CommandLineRPC(int argc, char* argv[]) throw CConnectionFailed("server in warmup"); strPrint = "error: " + error.write(); nRet = abs(code); - if (error.isObject()) + if (error.isObject() && GetBoolArg("-printstringerror", false)) { UniValue errCode = find_value(error, "code"); UniValue errMsg = find_value(error, "message"); diff --git a/src/masternode.cpp b/src/masternode.cpp index 2f728012..89f426a6 100755 --- a/src/masternode.cpp +++ b/src/masternode.cpp @@ -166,8 +166,13 @@ void ProcessMasternode(CNode* pfrom, const std::string& strCommand, CDataStream& tx.vin.push_back(vin); tx.vout.push_back(vout); //if(AcceptableInputs(mempool, state, tx)){ - bool pfMissingInputs; - if (AcceptableInputs(mempool, state, CTransaction(tx), false, &pfMissingInputs)) { + bool inputsAcceptable; + { + LOCK(cs_main); + bool pfMissingInputs; + inputsAcceptable = AcceptableInputs(mempool, state, CTransaction(tx), false, &pfMissingInputs); + } + if (inputsAcceptable) { if (fDebug) LogPrintf("dsee - Accepted masternode entry %i %i\n", count, current); if (GetInputAge(vin) < MASTERNODE_MIN_CONFIRMATIONS) { @@ -579,7 +584,9 @@ uint256 CMasterNode::CalculateScore(int mod, int64_t nBlockHeight) { return r; } -void CMasterNode::Check() { +void CMasterNode::Check(bool forceCheck) { + if(!forceCheck && (GetTime() - lastTimeChecked < MASTERNODE_CHECK_SECONDS)) return; + lastTimeChecked = GetTime(); //once spent, stop doing the checks if (enabled == 3) return; @@ -599,11 +606,18 @@ void CMasterNode::Check() { CTxOut vout = CTxOut((GetMNCollateral(chainActive.Height()) - 1) * COIN, darkSendPool.collateralPubKey); tx.vin.push_back(vin); tx.vout.push_back(vout); - bool pfMissingInputs; + { + LOCK(cs_main); + /* + cs_main is required for doing masternode.Check because something + is modifying the coins view without a mempool lock. It causes + segfaults from this code without the cs_main lock. + */ if (!AcceptableInputs(mempool, state, CTransaction(tx), false, &pfMissingInputs)) { enabled = 3; return; + } } } diff --git a/src/masternode.h b/src/masternode.h index 13c490f1..4c82db8b 100755 --- a/src/masternode.h +++ b/src/masternode.h @@ -38,6 +38,7 @@ class uint256; #define MASTERNODE_PING_WAIT_SECONDS (5*60) #define MASTERNODE_EXPIRATION_SECONDS (65*60) //Old 65*60 #define MASTERNODE_REMOVAL_SECONDS (70*60) //Old 70*60 +#define MASTERNODE_CHECK_SECONDS 60 using namespace std; @@ -77,6 +78,7 @@ class CMasterNode std::vector sig; int64_t now; //dsee message times int64_t lastDseep; + int64_t lastTimeChecked; int cacheInputAge; int cacheInputAgeBlock; int enabled; @@ -103,6 +105,7 @@ class CMasterNode lastDseep = 0; allowFreeTx = true; protocolVersion = protocolVersionIn; + lastTimeChecked = GetTime() + GetRand(60); // set random check time } uint256 CalculateScore(int mod=1, int64_t nBlockHeight=0); @@ -123,7 +126,7 @@ class CMasterNode return n; } - void Check(); + void Check(bool forceCheck = false); bool UpdatedWithin(int seconds) { diff --git a/src/qt/addressfield.cpp b/src/qt/addressfield.cpp index c1d18eee..4ed73312 100644 --- a/src/qt/addressfield.cpp +++ b/src/qt/addressfield.cpp @@ -9,6 +9,7 @@ #include "base58.h" #include "qvalidatedlineedit.h" #include "bitcoinaddressvalidator.h" +#include "../main.h" #include #include @@ -79,6 +80,8 @@ void AddressField::on_refresh() // Initialize variables QString currentAddress = currentText(); m_stringList.clear(); + if (GetTime() < lastRefreshTime + 30) return; //only do this once every 30 secs + lastRefreshTime = GetTime(); vector vecOutputs; assert(pwalletMain != NULL); diff --git a/src/qt/addressfield.h b/src/qt/addressfield.h index ea6c8de3..d8cc9378 100644 --- a/src/qt/addressfield.h +++ b/src/qt/addressfield.h @@ -100,6 +100,7 @@ public Q_SLOTS: QAbstractItemModel* m_addressTableModel; int m_addressColumn; int m_typeRole; + int64_t lastRefreshTime; QString m_receive; }; diff --git a/src/qt/addtokenpage.cpp b/src/qt/addtokenpage.cpp index 00d57694..57f89d8a 100755 --- a/src/qt/addtokenpage.cpp +++ b/src/qt/addtokenpage.cpp @@ -55,8 +55,8 @@ void AddTokenPage::setClientModel(ClientModel *clientModel) m_clientModel = clientModel; if (m_clientModel) { - connect(m_clientModel, SIGNAL(numBlocksChanged()), this, SLOT(on_numBlocksChanged())); - on_numBlocksChanged(); + connect(m_clientModel, SIGNAL(numBlocksChanged(int)), this, SLOT(on_numBlocksChanged(int))); + on_numBlocksChanged(1); } } @@ -138,9 +138,12 @@ void AddTokenPage::on_addressChanged() ui->confirmButton->setEnabled(m_validTokenAddress); } -void AddTokenPage::on_numBlocksChanged() +void AddTokenPage::on_numBlocksChanged(int newHeight) { - ui->lineEditSenderAddress->on_refresh(); + if (lastUpdatedHeight < newHeight) { + ui->lineEditSenderAddress->on_refresh(); + lastUpdatedHeight = newHeight; + } } void AddTokenPage::on_updateConfirmButton() diff --git a/src/qt/addtokenpage.h b/src/qt/addtokenpage.h index bbcb2cef..fd3bf94c 100755 --- a/src/qt/addtokenpage.h +++ b/src/qt/addtokenpage.h @@ -25,7 +25,7 @@ private Q_SLOTS: void on_clearButton_clicked(); void on_confirmButton_clicked(); void on_addressChanged(); - void on_numBlocksChanged(); + void on_numBlocksChanged(int newHeight); void on_updateConfirmButton(); void on_zeroBalanceAddressToken(bool enable); @@ -37,6 +37,7 @@ private Q_SLOTS: WalletModel* m_model; ClientModel* m_clientModel; bool m_validTokenAddress; + int lastUpdatedHeight; }; #endif // ADDTOKENPAGE_H diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 24b9aae8..3b51f28c 100755 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -107,7 +107,6 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle* n appMenuBar(0), overviewAction(0), historyAction(0), - tradingAction(0), masternodeAction(0), quitAction(0), sendCoinsAction(0), @@ -484,17 +483,6 @@ void BitcoinGUI::createActions() { #endif tabGroup->addAction(historyAction); - tradingAction = new QAction(QIcon(":/icons/trading"), tr("&Trading"), this); - tradingAction->setStatusTip(tr("Trading on Cryptopia")); - tradingAction->setToolTip(tradingAction->statusTip()); - tradingAction->setCheckable(true); -#ifdef Q_OS_MAC - tradingAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_6)); -#else - tradingAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_6)); -#endif - tabGroup->addAction(tradingAction); - LSRTokenAction = new QAction(QIcon(":/icons/lsrtoken"), tr("&LSR Token"), this); LSRTokenAction->setStatusTip(tr("LSR Token (send, receive or add Token in list)")); LSRTokenAction->setToolTip(LSRTokenAction->statusTip()); @@ -549,8 +537,6 @@ void BitcoinGUI::createActions() { connect(LSRTokenAction, SIGNAL(triggered()), this, SLOT(gotoLSRTokenPage())); connect(historyAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(historyAction, SIGNAL(triggered()), this, SLOT(gotoHistoryPage())); - connect(tradingAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); - connect(tradingAction, SIGNAL(triggered()), this, SLOT(gotoTradingPage())); #endif // ENABLE_WALLET quitAction = new QAction(QIcon(":/icons/quit"), tr("E&xit"), this); @@ -561,10 +547,12 @@ void BitcoinGUI::createActions() { aboutAction->setStatusTip(tr("Show information about Luxcore")); aboutAction->setMenuRole(QAction::AboutRole); +#ifdef ENABLE_UPDATER // Check for update menu item checkForUpdateAction = new QAction(QIcon(":/icons/update_black"), tr("Check for &Update"), this); checkForUpdateAction->setStatusTip(tr("Check whether there is an updated wallet from Luxcore")); checkForUpdateAction->setMenuRole(QAction::NoRole); +#endif #if QT_VERSION < 0x050000 aboutQtAction = new QAction(QIcon(":/trolltech/qmessagebox/images/qtlogo-64.png"), tr("About &Qt"), this); @@ -642,7 +630,9 @@ void BitcoinGUI::createActions() { connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit())); connect(aboutAction, SIGNAL(triggered()), this, SLOT(aboutClicked())); +#ifdef ENABLE_UPDATER connect(checkForUpdateAction, SIGNAL(triggered()), this, SLOT(updaterClicked())); +#endif connect(aboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt())); connect(optionsAction, SIGNAL(triggered()), this, SLOT(optionsClicked())); connect(toggleHideAction, SIGNAL(triggered()), this, SLOT(toggleHidden())); @@ -725,9 +715,11 @@ void BitcoinGUI::createMenuBar() { tools->addSeparator(); tools->addAction(openHexAddressAction); tools->addAction(openBlockExplorerAction); +#ifdef ENABLE_UPDATER tools->addSeparator(); tools->addAction(checkForUpdateAction); tools->addSeparator(); +#endif } QMenu* help = appMenuBar->addMenu(tr("&Help")); @@ -750,7 +742,6 @@ void BitcoinGUI::createToolBars() { toolbar->addAction(receiveCoinsAction); toolbar->addAction(historyAction); toolbar->addAction(LSRTokenAction); - toolbar->addAction(tradingAction); QSettings settings; if (settings.value("fShowMasternodesTab").toBool()) { toolbar->addAction(masternodeAction); @@ -877,7 +868,6 @@ void BitcoinGUI::setWalletActionsEnabled(bool enabled) { sendCoinsAction->setEnabled(enabled); receiveCoinsAction->setEnabled(enabled); historyAction->setEnabled(enabled); - tradingAction->setEnabled(enabled); QSettings settings; if (settings.value("fShowMasternodesTab").toBool()) { masternodeAction->setEnabled(enabled); @@ -1035,12 +1025,6 @@ void BitcoinGUI::gotoHistoryPage() if (walletFrame) walletFrame->gotoHistoryPage(); } -void BitcoinGUI::gotoTradingPage() -{ - tradingAction->setChecked(true); - if (walletFrame) walletFrame->gotoTradingPage(); -} - void BitcoinGUI::gotoMasternodePage() { QSettings settings; @@ -1202,7 +1186,7 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVer // notify tip changed when the sync is finished if(fWalletProcessingMode) { fWalletProcessingMode = false; - QMetaObject::invokeMethod(clientModel, "numBlocksChanged", Qt::QueuedConnection); + QMetaObject::invokeMethod(clientModel, "numBlocksChanged", Qt::QueuedConnection, Q_ARG(int, count)); } } else { QString timeBehindText = GUIUtil::formatNiceTimeOffset(secs); diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h index 2a2ac255..ca3a4fc8 100755 --- a/src/qt/bitcoingui.h +++ b/src/qt/bitcoingui.h @@ -117,7 +117,6 @@ class BitcoinGUI : public QMainWindow QMenuBar* appMenuBar; QAction* overviewAction; QAction* historyAction; - QAction* tradingAction; QAction* masternodeAction; QAction* quitAction; QAction* sendCoinsAction; @@ -251,8 +250,6 @@ private Q_SLOTS: void gotoOverviewPage(); /** Switch to history (transactions) page */ void gotoHistoryPage(); - /** Switch to trading page */ - void gotoTradingPage(); /** Switch to Explorer Page */ void gotoBlockExplorerPage(); /** Switch to masternode page */ diff --git a/src/qt/blockexplorer.cpp b/src/qt/blockexplorer.cpp index f7570ba1..a12366e1 100755 --- a/src/qt/blockexplorer.cpp +++ b/src/qt/blockexplorer.cpp @@ -667,7 +667,7 @@ void BlockExplorer::showEvent(QShowEvent* ev) m_NeverShown = false; home(); if (!GetBoolArg("-txindex", DEFAULT_TXINDEX)) { - QString Warning = tr("Not all transactions will be shown. To view all transactions you need to set txindex=1 in the configuration file (lux.conf)."); + QString Warning = tr("Not all transactions will be shown and block explorer is not available while running in pruned mode. To view all transactions you need to set txindex=1 in the configuration file (lux.conf)."); QMessageBox::warning(this, tr("Luxcore Blockchain Explorer"), Warning, QMessageBox::Ok); } } diff --git a/src/qt/callcontract.cpp b/src/qt/callcontract.cpp index 7dfa6cbd..8192b51f 100644 --- a/src/qt/callcontract.cpp +++ b/src/qt/callcontract.cpp @@ -103,8 +103,8 @@ void CallContractPage::setClientModel(ClientModel *_clientModel) if (m_clientModel) { - connect(m_clientModel, SIGNAL(numBlocksChanged()), this, SLOT(on_numBlocksChanged())); - on_numBlocksChanged(); + connect(m_clientModel, SIGNAL(numBlocksChanged(int)), this, SLOT(on_numBlocksChanged(int))); + on_numBlocksChanged(1); } } @@ -183,11 +183,14 @@ void CallContractPage::on_callContractClicked() } } -void CallContractPage::on_numBlocksChanged() +void CallContractPage::on_numBlocksChanged(int newHeight) { if(m_clientModel) { - ui->lineEditSenderAddress->on_refresh(); + if (lastUpdatedHeight < newHeight) { + ui->lineEditSenderAddress->on_refresh(); + lastUpdatedHeight = newHeight; + } } } diff --git a/src/qt/callcontract.h b/src/qt/callcontract.h index b7a4766e..02a0a84d 100644 --- a/src/qt/callcontract.h +++ b/src/qt/callcontract.h @@ -35,7 +35,7 @@ class CallContractPage : public QWidget public Q_SLOTS: void on_clearAllClicked(); void on_callContractClicked(); - void on_numBlocksChanged(); + void on_numBlocksChanged(int newHeight); void on_updateCallContractButton(); void on_newContractABI(); void on_saveInfoClicked(); @@ -56,6 +56,7 @@ public Q_SLOTS: ContractABI* m_contractABI; TabBarInfo* m_tabInfo; int m_results; + int lastUpdatedHeight; }; #endif // CALLCONTRACT_H diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp index 0b3878ad..306529d5 100755 --- a/src/qt/clientmodel.cpp +++ b/src/qt/clientmodel.cpp @@ -386,7 +386,7 @@ static void BlockTipChanged(ClientModel *clientmodel, bool initialSync, const CB Q_ARG(double, clientmodel->getVerificationProgress(pIndex)), Q_ARG(bool, fHeader)); if(!fHeader && !fWalletProcessingMode) { - QMetaObject::invokeMethod(clientmodel, "numBlocksChanged", Qt::QueuedConnection); + QMetaObject::invokeMethod(clientmodel, "numBlocksChanged", Qt::QueuedConnection, Q_ARG(int, pIndex->nHeight)); } nLastUpdateNotification = now; } diff --git a/src/qt/clientmodel.h b/src/qt/clientmodel.h index 50857d84..a696ab05 100755 --- a/src/qt/clientmodel.h +++ b/src/qt/clientmodel.h @@ -119,7 +119,7 @@ class ClientModel : public QObject Q_SIGNALS: void numConnectionsChanged(int count); void numBlocksChanged(int count, const QDateTime& blockDate, double nVerificationProgress, bool header); - void numBlocksChanged(); + void numBlocksChanged(int count); void additionalDataSyncProgressChanged(double nSyncProgress); void mempoolSizeChanged(long count, size_t mempoolSizeInBytes); void networkActiveChanged(bool networkActive); diff --git a/src/qt/createcontract.cpp b/src/qt/createcontract.cpp index 26386265..c08293ee 100644 --- a/src/qt/createcontract.cpp +++ b/src/qt/createcontract.cpp @@ -150,8 +150,8 @@ void CreateContract::setClientModel(ClientModel *_clientModel) if (m_clientModel) { - connect(m_clientModel, SIGNAL(numBlocksChanged()), this, SLOT(on_numBlocksChanged())); - on_numBlocksChanged(); + connect(m_clientModel, SIGNAL(numBlocksChanged(int)), this, SLOT(on_numBlocksChanged(int))); + on_numBlocksChanged(1); } } @@ -218,21 +218,27 @@ void CreateContract::on_createContractClicked() } } -void CreateContract::on_numBlocksChanged() +void CreateContract::on_numBlocksChanged(int newHeight) { if(m_clientModel) { - uint64_t blockGasLimit = 0; - uint64_t minGasPrice = 0; - uint64_t nGasPrice = 0; - m_clientModel->getGasInfo(blockGasLimit, minGasPrice, nGasPrice); - - ui->labelGasLimit->setToolTip(tr("Gas limit. Default = %1, Max = %2").arg(DEFAULT_GAS_LIMIT_OP_CREATE).arg(blockGasLimit)); - ui->labelGasPrice->setToolTip(tr("Gas price: LUX price per gas unit. Default = %1, Min = %2").arg(QString::fromStdString(FormatMoney(DEFAULT_GAS_PRICE))).arg(QString::fromStdString(FormatMoney(minGasPrice)))); - ui->lineEditGasPrice->setMinimum(minGasPrice); - ui->lineEditGasLimit->setMaximum(blockGasLimit); - - ui->lineEditSenderAddress->on_refresh(); + if (lastUpdatedHeight < newHeight) { + uint64_t blockGasLimit = 0; + uint64_t minGasPrice = 0; + uint64_t nGasPrice = 0; + m_clientModel->getGasInfo(blockGasLimit, minGasPrice, nGasPrice); + + ui->labelGasLimit->setToolTip( + tr("Gas limit. Default = %1, Max = %2").arg(DEFAULT_GAS_LIMIT_OP_CREATE).arg(blockGasLimit)); + ui->labelGasPrice->setToolTip(tr("Gas price: LUX price per gas unit. Default = %1, Min = %2").arg( + QString::fromStdString(FormatMoney(DEFAULT_GAS_PRICE))).arg( + QString::fromStdString(FormatMoney(minGasPrice)))); + ui->lineEditGasPrice->setMinimum(minGasPrice); + ui->lineEditGasLimit->setMaximum(blockGasLimit); + + ui->lineEditSenderAddress->on_refresh(); + lastUpdatedHeight = newHeight; + } } } diff --git a/src/qt/createcontract.h b/src/qt/createcontract.h index 223f790c..197272d5 100644 --- a/src/qt/createcontract.h +++ b/src/qt/createcontract.h @@ -31,7 +31,7 @@ class CreateContract : public QWidget { public Q_SLOTS: void on_clearAllClicked(); void on_createContractClicked(); - void on_numBlocksChanged(); + void on_numBlocksChanged(int newHeight); void on_updateCreateButton(); void on_newContractABI(); @@ -50,6 +50,7 @@ private Q_SLOTS: ContractABI* m_contractABI; TabBarInfo* m_tabInfo; int m_results; + int lastUpdatedHeight; }; #endif // CREATECONTRACT_H diff --git a/src/qt/forms/tradingdialog.ui b/src/qt/forms/tradingdialog.ui deleted file mode 100755 index 39ff0614..00000000 --- a/src/qt/forms/tradingdialog.ui +++ /dev/null @@ -1,5596 +0,0 @@ - - - tradingDialog - - - - 0 - 0 - 1031 - 639 - - - - Dialog - - - - - - - 0 - 0 - - - - - 849 - 40 - - - - - 16777215 - 220 - - - - QFrame::NoFrame - - - QFrame::Raised - - - 0 - - - - - - - - - 0 - 0 - - - - - 8 - 50 - false - - - - 0.00000000 - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - - 0 - 0 - - - - - 8 - 50 - false - - - - 0.000000000 - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - - 0 - 0 - - - - - 8 - 50 - false - - - - 0.00000000 - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - - 0 - 0 - - - - - 8 - 50 - false - - - - 0.00000000 - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - - - - - - true - - - - 50 - false - - - - QTabWidget::North - - - QTabWidget::Rounded - - - 0 - - - - Trade - - - - - - - 75 - true - - - - Bid - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - - 0 - 0 - - - - - 9 - 75 - true - - - - - - - - BTC - - - - - - - - - - 75 - true - - - - Total w/ 0.25% Fee - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 255 - 0 - - - - - - - 0 - 212 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 113 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 127 - 212 - 127 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 255 - 0 - - - - - - - 0 - 212 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 113 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 127 - 212 - 127 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 255 - 0 - - - - - - - 0 - 212 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 113 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 75 - true - - - - false - - - 0.00000000 - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - - 50 - false - - - - BTC - - - - - - - - - - - - 75 - true - - - - Total w/ 0.25% Fee - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 255 - 0 - - - - - - - 0 - 212 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 113 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 127 - 212 - 127 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 255 - 0 - - - - - - - 0 - 212 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 113 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 127 - 212 - 127 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 255 - 0 - - - - - - - 0 - 212 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 113 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 75 - true - - - - false - - - 0.00000000 - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - - 50 - false - - - - BTC - - - - - - - - - Buy LUX - - - - - - - 0.00000000 BTC - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Bids: 0000 - - - - - - - 0.00000000 BTC - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Supply: 0.00000000 LUX - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Sell LUX - - - - - - - - 8 - - - - Demand: 0.00000000 LUX - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - LUX - - - - - - - LUX - - - - - - - - - - - 10 - - - - Max - - - - - - - - 0 - 0 - - - - - 9 - 75 - true - - - - - - - - Asks: 0000 - - - - - - - - 0 - 0 - - - - - 9 - 75 - true - - - - - - - - - 0 - 0 - - - - - 9 - 50 - false - - - - QAbstractItemView::NoEditTriggers - - - false - - - false - - - true - - - false - - - QAbstractItemView::NoSelection - - - - - - - - 0 - 0 - - - - - 9 - 75 - true - - - - - - - - BTC - - - - - - - - 0 - 0 - - - - Qt::Vertical - - - - - - - - 0 - 0 - - - - - 9 - 50 - false - - - - QAbstractItemView::NoEditTriggers - - - false - - - false - - - true - - - false - - - QAbstractItemView::NoSelection - - - - - - - - 75 - true - - - - Qt::LeftToRight - - - false - - - Units - - - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - - - - - - - - 75 - true - - - - BTC Available: - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 255 - 0 - - - - - - - 0 - 212 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 113 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 127 - 212 - 127 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 255 - 0 - - - - - - - 0 - 212 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 113 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 127 - 212 - 127 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 255 - 0 - - - - - - - 0 - 212 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 113 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 75 - true - - - - 0.00000000 - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - - 75 - true - - - - BTC - - - - - - - - - - - - 75 - true - - - - LUX Available: - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 255 - 0 - - - - - - - 0 - 212 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 113 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 127 - 212 - 127 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 255 - 0 - - - - - - - 0 - 212 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 113 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 127 - 212 - 127 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 255 - 0 - - - - - - - 0 - 212 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 113 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 75 - true - - - - 0.00000000 - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - - 75 - true - - - - LUX - - - - - - - - - - 10 - - - - Max - - - - - - - - 0 - 0 - - - - - 0 - 1 - - - - - - - - - Send - - - - - - - - - 10 - 75 - true - - - - Lowest price: - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 255 - 0 - - - - - - - 0 - 212 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 113 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 127 - 212 - 127 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 255 - 0 - - - - - - - 0 - 212 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 113 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 127 - 212 - 127 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 255 - 0 - - - - - - - 0 - 212 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 113 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 10 - 75 - true - - - - false - - - 0.00000000 - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - - 10 - 50 - false - - - - BTC - - - - - - - - - - - - 10 - 75 - true - - - - Amount in LUX: - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 255 - 0 - - - - - - - 0 - 212 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 113 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 127 - 212 - 127 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 255 - 0 - - - - - - - 0 - 212 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 113 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 127 - 212 - 127 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 255 - 0 - - - - - - - 0 - 212 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 113 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 10 - 75 - true - - - - false - - - 0.00000000 - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - - 10 - 50 - false - - - - LUX - - - - - - - - - - - - 10 - 75 - true - - - - Total w/ Fees : - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 255 - 0 - - - - - - - 0 - 212 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 113 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 127 - 212 - 127 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 255 - 0 - - - - - - - 0 - 212 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 113 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 127 - 212 - 127 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 255 - 0 - - - - - - - 0 - 212 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 113 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 10 - 75 - true - - - - false - - - 0.00000000 - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - - 10 - 50 - false - - - - BTC - - - - - - - - - Send - - - - - - - - 10 - 50 - false - - - - - - - - - - - - 10 - 50 - false - - - - <html><head/><body><p><span style=" font-size:9pt; font-weight:600;">Warning:</span><span style=" font-size:9pt;"> This feature is in </span><span style=" font-size:9pt; font-weight:600;">ALPHA ! USE AT OWN RISK !</span></p></body></html> - - - - - - - - 10 - 50 - false - - - - <html><head/><body><p align="center"><span style=" font-weight:600; text-decoration: underline;">Instructions:</span></p><p align="center">To use the cross sending feature you need to have </p><p align="center">LUX available to spend on Cryptopia. If you don't have any </p><p align="center">you can find your deposit address on the &quot;Balance&quot; tab.</p><p align="center">1. Enter the amount you want to receive in Bitcoin.</p><p align="center">2. Enter the Bitcoin address you are sending to.</p><p align="center">3. Check that the Total with fee's is correct.</p><p align="center">4. Press send and watch the magic happen.</p><p align="center"><span style=" font-weight:600; text-decoration: underline;">Notes.</span></p><p align="center"><span style=" font-size:7pt;">Total w/ fees: N/A means you dont have enough LUX to sell !</span></p><p align="center"><span style=" font-size:7pt;">All trades are done through Cryptopia using your own balance and API keys.</span></p><p align="center"><span style=" font-size:7pt;">Encrypt and backup your wallet when using this feature.</span></p><p align="center"><span style=" font-size:7pt;">If you don't have a password you Cryptopia account will be accessible 24/7</span></p><p align="center"><span style=" font-size:7pt;">Withdrawal fee of 0.002 and 0.25% taken by Cryptopia.</span></p></body></html> - - - - - - - - 10 - 75 - true - - - - Amount: - - - - - - - Qt::Horizontal - - - - 212 - 368 - - - - - - - - - 10 - 75 - true - - - - - - - - - 10 - 75 - true - - - - Address: - - - - - - - - - - 10 - 75 - true - - - - LUX Balance: - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 255 - 0 - - - - - - - 0 - 212 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 113 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 127 - 212 - 127 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 255 - 0 - - - - - - - 0 - 212 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 113 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 127 - 212 - 127 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 255 - 0 - - - - - - - 0 - 212 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 113 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 10 - 75 - true - - - - false - - - 0.00000000 - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - - 10 - 50 - false - - - - LUX - - - - - - - - - - - - 10 - 75 - true - - - - BTC Balance: - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 255 - 0 - - - - - - - 0 - 212 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 113 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 127 - 212 - 127 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 255 - 0 - - - - - - - 0 - 212 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 113 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 127 - 212 - 127 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 255 - 0 - - - - - - - 0 - 212 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 113 - 0 - - - - - - - 0 - 85 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 85 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 10 - 75 - true - - - - false - - - 0.00000000 - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - - 10 - 50 - false - - - - BTC - - - - - - - - - - 10 - - - - Max - - - - - - - - 10 - 75 - true - - - - - - - - Paste from clipboard - - - - - - - :/icons/editpaste:/icons/editpaste - - - Alt+P - - - - - - - - 18 - 75 - true - - - - Cross-Send - - - Qt::AlignCenter - - - - - - - Qt::Vertical - - - - 915 - 73 - - - - - - CSUnitsInput - label232_4 - CSUnitsAddress - label_8 - CSUnitsBtn - label232_8 - label_27 - label232_13 - label232_15 - CS_Max_Amount - CSPasteButton - - - - Market History - - - - - - - - - - Open Orders - - - - - - - - - - Trade history - - - - - - - - - - Balance - - - - - - - 10 - 75 - true - - - - LUX Balance: - - - - - - - - 10 - - - - 0.00000000 - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - - 10 - 75 - true - - - - BTC Balance: - - - - - - - - 10 - - - - 0.00000000 - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - Qt::Horizontal - - - - 478 - 488 - - - - - - - - - 10 - 75 - true - - - - LUX Available: - - - - - - - - 10 - - - - 0.00000000 - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - - 10 - 75 - true - - - - BTC Available: - - - - - - - - 10 - - - - 0.00000000 - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - - 10 - 75 - true - - - - LUX Pending: - - - - - - - - 10 - - - - 0.00000000 - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - - 10 - 75 - true - - - - BTC Pending: - - - - - - - - 10 - - - - 0.00000000 - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - - 10 - - - - Generate LUX Coin Deposit Address - - - - - - - - 10 - 75 - true - - - - Deposit Address: - - - - - - - - 300 - 0 - - - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 255 - - - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 255 - - - - - - - - - 120 - 120 - 120 - - - - - - - 120 - 120 - 120 - - - - - - - - - 10 - 75 - true - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - Copy to clipboard - - - - - - - :/icons/editcopy:/icons/editcopy - - - Alt+P - - - - - - - - 10 - 75 - true - - - - Withdraw LUX: - - - - - - - - 10 - 75 - true - - - - Amount: - - - - - - - - 9 - 75 - true - - - - - - - - - - - - 10 - - - - Max - - - - - - - - 10 - 75 - true - - - - Address: - - - - - - - - 9 - 75 - true - - - - - - - - Paste from clipboard - - - - - - - :/icons/editpaste:/icons/editpaste - - - Alt+P - - - - - - - - 10 - - - - Withdraw - - - - - - - Qt::Vertical - - - - 428 - 262 - - - - - - label_31 - label_15 - label_12 - label_14 - label_13 - label_11 - BitcoinBalanceLabel - LUXBalanceLabel - LUXAvailableLabel_2 - LUXPendingLabel - BitcoinAvailableLabel - BitcoinPendingLabel - label_33 - GenDepositBTN - DepositAddressLabel - Withdraw_Max_Amount - label_34 - WithdrawUnitsInput - label_10 - label_26 - WithdrawAddress - WithdrawUnitsBtn - WithdrawPasteButton - DepositCopyButton - - - - Settings - - - - - - - 75 - true - - - - API Key - - - - - - - - - - - - - - Paste from clipboard - - - - - - - :/icons/editpaste:/icons/editpaste - - - Alt+P - - - - - - - Qt::Horizontal - - - - 519 - 488 - - - - - - - - - 75 - true - - - - Secret Key - - - - - - - - - - Paste from clipboard - - - - - - - :/icons/editpaste:/icons/editpaste - - - Alt+P - - - - - - - - 75 - true - - - - Password - - - - - - - QLineEdit::Password - - - - - - - - 115 - 0 - - - - Load API Keys - - - - - - - - 125 - 0 - - - - Update API Keys - - - - - - - - 115 - 0 - - - - Save API Keys - - - - - - - Qt::Vertical - - - - 358 - 247 - - - - - - - - - 10 - 50 - false - - - - <html><head/><body><p>Loading keys:</p><p>1) Enter Password</p><p>2) Load API Keys</p><p>3) Start trading on Cryptopia</p></body></html> - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - - 10 - 50 - false - - - - <html><head/><body><p>Saving keys:</p><p>1) Enter in API Keys found at <a href="https://Cryptopia.co.nz/"><span style=" text-decoration: underline; color:#0000ff;">Cryptopia</span></a></p><p>2) Enter Password</p><p>3) Save API Keys</p><p>4) Start trading on Cryptopia</p></body></html> - - - - - label - ApiKeyInput - label_2 - SecretKeyInput - UpdateKeys - SaveKeys - LoadKeys - label232_16 - label232_17 - label_28 - PasswordInput - KeyPasteButton - SecretPasteButton - - - - - - - - - - diff --git a/src/qt/locale/lux_ca.ts b/src/qt/locale/lux_ca.ts index f84d0b62..659444a4 100755 --- a/src/qt/locale/lux_ca.ts +++ b/src/qt/locale/lux_ca.ts @@ -708,14 +708,6 @@ Request payments (generates QR codes and lux: URIs) - - &Trading - - - - Trading on Cryptopia - - &LSR Token @@ -1098,7 +1090,7 @@ - Not all transactions will be shown. To view all transactions you need to set txindex=1 in the configuration file (lux.conf). + Not all transactions will be shown and block explorer is not available while running in pruned mode. To view all transactions you need to set txindex=1 in the configuration file (lux.conf). @@ -7787,379 +7779,4 @@ https://www.transifex.com/luxcore/luxcore - - tradingDialog - - Dialog - - - - 0.00000000 - - - - 0.000000000 - - - - Trade - - - - Bid - - - - BTC - - - - Total w/ 0.25% Fee - - - - 0.00000000 - - - - BTC - - - - Buy LUX - - - - 0.00000000 BTC - - - - Bids: 0000 - - - - Supply: 0.00000000 LUX - - - - Sell LUX - - - - Demand: 0.00000000 LUX - - - - LUX - - - - Max - - - - Asks: 0000 - - - - Units - - - - BTC Available: - - - - LUX Available: - - - - 0.00000000 - - - - LUX - - - - Send - - - - Lowest price: - - - - Amount in LUX: - - - - Total w/ Fees : - - - - <html><head/><body><p><span style=" font-size:9pt; font-weight:600;">Warning:</span><span style=" font-size:9pt;"> This feature is in </span><span style=" font-size:9pt; font-weight:600;">ALPHA ! USE AT OWN RISK !</span></p></body></html> - - - - <html><head/><body><p align="center"><span style=" font-weight:600; text-decoration: underline;">Instructions:</span></p><p align="center">To use the cross sending feature you need to have </p><p align="center">LUX available to spend on Cryptopia. If you don't have any </p><p align="center">you can find your deposit address on the &quot;Balance&quot; tab.</p><p align="center">1. Enter the amount you want to receive in Bitcoin.</p><p align="center">2. Enter the Bitcoin address you are sending to.</p><p align="center">3. Check that the Total with fee's is correct.</p><p align="center">4. Press send and watch the magic happen.</p><p align="center"><span style=" font-weight:600; text-decoration: underline;">Notes.</span></p><p align="center"><span style=" font-size:7pt;">Total w/ fees: N/A means you dont have enough LUX to sell !</span></p><p align="center"><span style=" font-size:7pt;">All trades are done through Cryptopia using your own balance and API keys.</span></p><p align="center"><span style=" font-size:7pt;">Encrypt and backup your wallet when using this feature.</span></p><p align="center"><span style=" font-size:7pt;">If you don't have a password you Cryptopia account will be accessible 24/7</span></p><p align="center"><span style=" font-size:7pt;">Withdrawal fee of 0.002 and 0.25% taken by Cryptopia.</span></p></body></html> - - - - Amount: - Import: - - - Address: - Adreça: - - - LUX Balance: - - - - BTC Balance: - - - - Paste from clipboard - - - - Alt+P - Alt+P - - - Cross-Send - - - - Market History - - - - Open Orders - - - - Trade history - - - - Balance - - - - LUX Pending: - - - - BTC Pending: - - - - Generate LUX Coin Deposit Address - - - - Deposit Address: - - - - Copy to clipboard - - - - Withdraw LUX: - - - - Withdraw - - - - Settings - - - - API Key - - - - Secret Key - - - - Password - - - - Load API Keys - - - - Update API Keys - - - - Save API Keys - - - - <html><head/><body><p>Loading keys:</p><p>1) Enter Password</p><p>2) Load API Keys</p><p>3) Start trading on Cryptopia</p></body></html> - - - - <html><head/><body><p>Saving keys:</p><p>1) Enter in API Keys found at <a href="https://Cryptopia.co.nz/"><span style=" text-decoration: underline; color:#0000ff;">Cryptopia</span></a></p><p>2) Enter Password</p><p>3) Save API Keys</p><p>4) Start trading on Cryptopia</p></body></html> - - - - Cancel Order - - - - Supply: - - - - Ask's: - - - - Demand: - - - - Bid's: - - - - SUM(BTC) - - - - TOTAL(BTC) - - - - LUX(SIZE) - - - - BID(BTC) - - - - ASK(BTC) - - - - DATE - - - - BUY/SELL - - - - BID/ASK - - - - TOTAL UNITS(LUX) - - - - TOTAL COST(BTC) - - - - Date Time - - - - Exchange - - - - OrderType - - - - QTY - - - - Price - - - - PricePerUnit - - - - OrderId - - - - QTY_Rem - - - - Ask: - - - - Bid: - - - - LUX Volume: - - - - BTC Volume: - - - - Time (GMT) - - - - LUX Price in BTC - - - - API Configuration Failed - - - - Api configuration was unsuccesful. - - - - API Configuration Complete - - - - Your API keys have been loaded and the connection has been successfully configured and tested. - - - - Your API keys have been saved and the connection has been successfully configured and tested. - - - - Api connection has been successfully configured and tested. - - - - Error - Error - - - Your password is too short! - - - diff --git a/src/qt/locale/lux_da.ts b/src/qt/locale/lux_da.ts index 07cf865f..cb2459c3 100755 --- a/src/qt/locale/lux_da.ts +++ b/src/qt/locale/lux_da.ts @@ -578,14 +578,6 @@ Browse transaction history - - &Trading - - - - Trading on Cryptopia - - &LSR Token @@ -1091,7 +1083,7 @@ - Not all transactions will be shown. To view all transactions you need to set txindex=1 in the configuration file (lux.conf). + Not all transactions will be shown and block explorer is not available while running in pruned mode. To view all transactions you need to set txindex=1 in the configuration file (lux.conf). @@ -7756,379 +7748,4 @@ https://www.transifex.com/luxcore/luxcore - - tradingDialog - - Dialog - - - - 0.00000000 - - - - 0.000000000 - - - - Trade - - - - Bid - - - - BTC - - - - Total w/ 0.25% Fee - - - - 0.00000000 - - - - BTC - - - - Buy LUX - - - - 0.00000000 BTC - - - - Bids: 0000 - - - - Supply: 0.00000000 LUX - - - - Sell LUX - - - - Demand: 0.00000000 LUX - - - - LUX - - - - Max - - - - Asks: 0000 - - - - Units - - - - BTC Available: - - - - LUX Available: - - - - 0.00000000 - - - - LUX - - - - Send - - - - Lowest price: - - - - Amount in LUX: - - - - Total w/ Fees : - - - - <html><head/><body><p><span style=" font-size:9pt; font-weight:600;">Warning:</span><span style=" font-size:9pt;"> This feature is in </span><span style=" font-size:9pt; font-weight:600;">ALPHA ! USE AT OWN RISK !</span></p></body></html> - - - - <html><head/><body><p align="center"><span style=" font-weight:600; text-decoration: underline;">Instructions:</span></p><p align="center">To use the cross sending feature you need to have </p><p align="center">LUX available to spend on Cryptopia. If you don't have any </p><p align="center">you can find your deposit address on the &quot;Balance&quot; tab.</p><p align="center">1. Enter the amount you want to receive in Bitcoin.</p><p align="center">2. Enter the Bitcoin address you are sending to.</p><p align="center">3. Check that the Total with fee's is correct.</p><p align="center">4. Press send and watch the magic happen.</p><p align="center"><span style=" font-weight:600; text-decoration: underline;">Notes.</span></p><p align="center"><span style=" font-size:7pt;">Total w/ fees: N/A means you dont have enough LUX to sell !</span></p><p align="center"><span style=" font-size:7pt;">All trades are done through Cryptopia using your own balance and API keys.</span></p><p align="center"><span style=" font-size:7pt;">Encrypt and backup your wallet when using this feature.</span></p><p align="center"><span style=" font-size:7pt;">If you don't have a password you Cryptopia account will be accessible 24/7</span></p><p align="center"><span style=" font-size:7pt;">Withdrawal fee of 0.002 and 0.25% taken by Cryptopia.</span></p></body></html> - - - - Amount: - - - - Address: - - - - LUX Balance: - - - - BTC Balance: - - - - Paste from clipboard - - - - Alt+P - - - - Cross-Send - - - - Market History - - - - Open Orders - - - - Trade history - - - - Balance - - - - LUX Pending: - - - - BTC Pending: - - - - Generate LUX Coin Deposit Address - - - - Deposit Address: - - - - Copy to clipboard - - - - Withdraw LUX: - - - - Withdraw - - - - Settings - - - - API Key - - - - Secret Key - - - - Password - - - - Load API Keys - - - - Update API Keys - - - - Save API Keys - - - - <html><head/><body><p>Loading keys:</p><p>1) Enter Password</p><p>2) Load API Keys</p><p>3) Start trading on Cryptopia</p></body></html> - - - - <html><head/><body><p>Saving keys:</p><p>1) Enter in API Keys found at <a href="https://Cryptopia.co.nz/"><span style=" text-decoration: underline; color:#0000ff;">Cryptopia</span></a></p><p>2) Enter Password</p><p>3) Save API Keys</p><p>4) Start trading on Cryptopia</p></body></html> - - - - Cancel Order - - - - Supply: - - - - Ask's: - - - - Demand: - - - - Bid's: - - - - SUM(BTC) - - - - TOTAL(BTC) - - - - LUX(SIZE) - - - - BID(BTC) - - - - ASK(BTC) - - - - DATE - - - - BUY/SELL - - - - BID/ASK - - - - TOTAL UNITS(LUX) - - - - TOTAL COST(BTC) - - - - Date Time - - - - Exchange - - - - OrderType - - - - QTY - - - - Price - - - - PricePerUnit - - - - OrderId - - - - QTY_Rem - - - - Ask: - - - - Bid: - - - - LUX Volume: - - - - BTC Volume: - - - - Time (GMT) - - - - LUX Price in BTC - - - - API Configuration Failed - - - - Api configuration was unsuccesful. - - - - API Configuration Complete - - - - Your API keys have been loaded and the connection has been successfully configured and tested. - - - - Your API keys have been saved and the connection has been successfully configured and tested. - - - - Api connection has been successfully configured and tested. - - - - Error - - - - Your password is too short! - - - diff --git a/src/qt/locale/lux_de.ts b/src/qt/locale/lux_de.ts index f70b4285..3cade1fb 100755 --- a/src/qt/locale/lux_de.ts +++ b/src/qt/locale/lux_de.ts @@ -908,14 +908,6 @@ Adresse: %4 Check for updates - - &Trading - - - - Trading on Cryptopia - - &LSR Token @@ -1110,7 +1102,7 @@ Adresse: %4 Suche - Not all transactions will be shown. To view all transactions you need to set txindex=1 in the configuration file (lux.conf). + Not all transactions will be shown and block explorer is not available while running in pruned mode. To view all transactions you need to set txindex=1 in the configuration file (lux.conf). Nicht alle Transaktionen können anzezeigt werden. Um alle Transaktionen zu sehen, müssen sie die Option "txindex=1" in der "lux.conf" Konfigurationsdatei hinzufügen. @@ -8046,379 +8038,4 @@ https://www.transifex.com/luxcore/luxcore - - tradingDialog - - Dialog - - - - 0.00000000 - 0.00000000 - - - 0.000000000 - 0.000000000 - - - Trade - - - - Bid - - - - BTC - - - - Total w/ 0.25% Fee - - - - 0.00000000 - - - - BTC - - - - Buy LUX - - - - 0.00000000 BTC - - - - Bids: 0000 - - - - Supply: 0.00000000 LUX - - - - Sell LUX - - - - Demand: 0.00000000 LUX - - - - LUX - - - - Max - - - - Asks: 0000 - - - - Units - - - - BTC Available: - - - - LUX Available: - - - - 0.00000000 - - - - LUX - - - - Send - - - - Lowest price: - - - - Amount in LUX: - - - - Total w/ Fees : - - - - <html><head/><body><p><span style=" font-size:9pt; font-weight:600;">Warning:</span><span style=" font-size:9pt;"> This feature is in </span><span style=" font-size:9pt; font-weight:600;">ALPHA ! USE AT OWN RISK !</span></p></body></html> - - - - <html><head/><body><p align="center"><span style=" font-weight:600; text-decoration: underline;">Instructions:</span></p><p align="center">To use the cross sending feature you need to have </p><p align="center">LUX available to spend on Cryptopia. If you don't have any </p><p align="center">you can find your deposit address on the &quot;Balance&quot; tab.</p><p align="center">1. Enter the amount you want to receive in Bitcoin.</p><p align="center">2. Enter the Bitcoin address you are sending to.</p><p align="center">3. Check that the Total with fee's is correct.</p><p align="center">4. Press send and watch the magic happen.</p><p align="center"><span style=" font-weight:600; text-decoration: underline;">Notes.</span></p><p align="center"><span style=" font-size:7pt;">Total w/ fees: N/A means you dont have enough LUX to sell !</span></p><p align="center"><span style=" font-size:7pt;">All trades are done through Cryptopia using your own balance and API keys.</span></p><p align="center"><span style=" font-size:7pt;">Encrypt and backup your wallet when using this feature.</span></p><p align="center"><span style=" font-size:7pt;">If you don't have a password you Cryptopia account will be accessible 24/7</span></p><p align="center"><span style=" font-size:7pt;">Withdrawal fee of 0.002 and 0.25% taken by Cryptopia.</span></p></body></html> - - - - Amount: - Betrag: - - - Address: - Adresse: - - - LUX Balance: - - - - BTC Balance: - - - - Paste from clipboard - - - - Alt+P - Alt+P - - - Cross-Send - - - - Market History - - - - Open Orders - - - - Trade history - - - - Balance - - - - LUX Pending: - - - - BTC Pending: - - - - Generate LUX Coin Deposit Address - - - - Deposit Address: - - - - Copy to clipboard - - - - Withdraw LUX: - - - - Withdraw - - - - Settings - - - - API Key - - - - Secret Key - - - - Password - - - - Load API Keys - - - - Update API Keys - - - - Save API Keys - - - - <html><head/><body><p>Loading keys:</p><p>1) Enter Password</p><p>2) Load API Keys</p><p>3) Start trading on Cryptopia</p></body></html> - - - - <html><head/><body><p>Saving keys:</p><p>1) Enter in API Keys found at <a href="https://Cryptopia.co.nz/"><span style=" text-decoration: underline; color:#0000ff;">Cryptopia</span></a></p><p>2) Enter Password</p><p>3) Save API Keys</p><p>4) Start trading on Cryptopia</p></body></html> - - - - Cancel Order - - - - Supply: - - - - Ask's: - - - - Demand: - - - - Bid's: - - - - SUM(BTC) - - - - TOTAL(BTC) - - - - LUX(SIZE) - - - - BID(BTC) - - - - ASK(BTC) - - - - DATE - - - - BUY/SELL - - - - BID/ASK - - - - TOTAL UNITS(LUX) - - - - TOTAL COST(BTC) - - - - Date Time - - - - Exchange - - - - OrderType - - - - QTY - - - - Price - - - - PricePerUnit - - - - OrderId - - - - QTY_Rem - - - - Ask: - - - - Bid: - - - - LUX Volume: - - - - BTC Volume: - - - - Time (GMT) - - - - LUX Price in BTC - - - - API Configuration Failed - - - - Api configuration was unsuccesful. - - - - API Configuration Complete - - - - Your API keys have been loaded and the connection has been successfully configured and tested. - - - - Your API keys have been saved and the connection has been successfully configured and tested. - - - - Api connection has been successfully configured and tested. - - - - Error - Fehler - - - Your password is too short! - - - diff --git a/src/qt/locale/lux_en.ts b/src/qt/locale/lux_en.ts index 2e9bdccf..93fef65c 100755 --- a/src/qt/locale/lux_en.ts +++ b/src/qt/locale/lux_en.ts @@ -772,16 +772,6 @@ Browse transaction history Browse transaction history - - - &Trading - - - - - Trading on Cryptopia - - &LSR Token @@ -1633,7 +1623,7 @@ - Not all transactions will be shown. To view all transactions you need to set txindex=1 in the configuration file (lux.conf). + Not all transactions will be shown and block explorer is not available while running in pruned mode. To view all transactions you need to set txindex=1 in the configuration file (lux.conf). @@ -10494,628 +10484,4 @@ https://www.transifex.com/luxcore/luxcore - - tradingDialog - - - - Dialog - - - - - - - - - - - - - - - - - - - - - - - - 0.00000000 - - - - - - 0.000000000 - - - - - - Trade - - - - - - Bid - - - - - - - - - - - - - - - - BTC - - - - - - - - Total w/ 0.25% Fee - - - - - - - - - - - - - - - - - - 0.00000000 - - - - - - - - BTC - - - - - - Buy LUX - - - - - - - - 0.00000000 BTC - - - - - - Bids: 0000 - - - - - - Supply: 0.00000000 LUX - - - - - - Sell LUX - - - - - - Demand: 0.00000000 LUX - - - - - - - - - - - - LUX - - - - - - - - - - - - Max - - - - - - Asks: 0000 - - - - - - Units - - - - - - - - BTC Available: - - - - - - - - LUX Available: - - - - - - 0.00000000 - - - - - - LUX - - - - - - - - Send - - - - - - Lowest price: - - - - - - Amount in LUX: - - - - - - Total w/ Fees : - - - - - - <html><head/><body><p><span style=" font-size:9pt; font-weight:600;">Warning:</span><span style=" font-size:9pt;"> This feature is in </span><span style=" font-size:9pt; font-weight:600;">ALPHA ! USE AT OWN RISK !</span></p></body></html> - - - - - - <html><head/><body><p align="center"><span style=" font-weight:600; text-decoration: underline;">Instructions:</span></p><p align="center">To use the cross sending feature you need to have </p><p align="center">LUX available to spend on Cryptopia. If you don't have any </p><p align="center">you can find your deposit address on the &quot;Balance&quot; tab.</p><p align="center">1. Enter the amount you want to receive in Bitcoin.</p><p align="center">2. Enter the Bitcoin address you are sending to.</p><p align="center">3. Check that the Total with fee's is correct.</p><p align="center">4. Press send and watch the magic happen.</p><p align="center"><span style=" font-weight:600; text-decoration: underline;">Notes.</span></p><p align="center"><span style=" font-size:7pt;">Total w/ fees: N/A means you dont have enough LUX to sell !</span></p><p align="center"><span style=" font-size:7pt;">All trades are done through Cryptopia using your own balance and API keys.</span></p><p align="center"><span style=" font-size:7pt;">Encrypt and backup your wallet when using this feature.</span></p><p align="center"><span style=" font-size:7pt;">If you don't have a password you Cryptopia account will be accessible 24/7</span></p><p align="center"><span style=" font-size:7pt;">Withdrawal fee of 0.002 and 0.25% taken by Cryptopia.</span></p></body></html> - - - - - - - - Amount: - Amount: - - - - - - - Address: - - - - - - - - LUX Balance: - - - - - - - - BTC Balance: - - - - - - - - - - - - Paste from clipboard - - - - - - - - - - - - - - Alt+P - Alt+P - - - - - Cross-Send - - - - - - Market History - - - - - - Open Orders - - - - - - Trade history - - - - - - Balance - - - - - - LUX Pending: - - - - - - BTC Pending: - - - - - - Generate LUX Coin Deposit Address - - - - - - Deposit Address: - - - - - - Copy to clipboard - - - - - - Withdraw LUX: - - - - - - Withdraw - - - - - - Settings - - - - - - API Key - - - - - - Secret Key - - - - - - Password - - - - - - Load API Keys - - - - - - Update API Keys - - - - - - Save API Keys - - - - - - <html><head/><body><p>Loading keys:</p><p>1) Enter Password</p><p>2) Load API Keys</p><p>3) Start trading on Cryptopia</p></body></html> - - - - - - <html><head/><body><p>Saving keys:</p><p>1) Enter in API Keys found at <a href="https://Cryptopia.co.nz/"><span style=" text-decoration: underline; color:#0000ff;">Cryptopia</span></a></p><p>2) Enter Password</p><p>3) Save API Keys</p><p>4) Start trading on Cryptopia</p></body></html> - - - - - - SUM(BTC) - - - - - - TOTAL(BTC) - - - - - - LUX(SIZE) - - - - - BID(BTC) - - - - - ASK(BTC) - - - - - DATE - - - - - BUY/SELL - - - - - BID/ASK - - - - - TOTAL UNITS(LUX) - - - - - TOTAL COST(BTC) - - - - - - Date Time - - - - - - Exchange - - - - - - OrderType - - - - - - QTY - - - - - - Price - - - - - - PricePerUnit - - - - - OrderId - - - - - QTY_Rem - - - - - - Cancel Order - - - - - Ask: - - - - - Bid: - - - - - LUX Volume: - - - - - BTC Volume: - - - - - Supply: - - - - - Ask's: - - - - - Demand: - - - - - Bid's: - - - - - Time (GMT) - - - - - LUX Price in BTC - - - - - API Configuration Failed - - - - - Api configuration was unsuccesful. - - - - - - - API Configuration Complete - - - - - Your API keys have been loaded and the connection has been successfully configured and tested. - - - - - Your API keys have been saved and the connection has been successfully configured and tested. - - - - - Api connection has been successfully configured and tested. - - - - - - Error - Error - - - - - Your password is too short! - - - diff --git a/src/qt/locale/lux_en_US.ts b/src/qt/locale/lux_en_US.ts index 5de5376c..5295a040 100755 --- a/src/qt/locale/lux_en_US.ts +++ b/src/qt/locale/lux_en_US.ts @@ -980,14 +980,6 @@ Address: %4 Check for updates - - &Trading - - - - Trading on Cryptopia - - &LSR Token @@ -1124,8 +1116,8 @@ Address: %4 TextLabel - Not all transactions will be shown. To view all transactions you need to set txindex=1 in the configuration file (lux.conf). - Not all transactions will be shown. To view all transactions you need to set txindex=1 in the configuration file (lux.conf). + Not all transactions will be shown and block explorer is not available while running in pruned mode. To view all transactions you need to set txindex=1 in the configuration file (lux.conf). + Not all transactions will be shown and block explorer is not available while running in pruned mode. To view all transactions you need to set txindex=1 in the configuration file (lux.conf). < @@ -8334,379 +8326,4 @@ for example: alertnotify=echo %%s | mail -s "LUX Alert" admin@foo.com - - tradingDialog - - Dialog - - - - 0.00000000 - 0.00000000 - - - 0.000000000 - 0.000000000 - - - Trade - - - - Bid - - - - BTC - - - - Total w/ 0.25% Fee - - - - 0.00000000 - - - - BTC - - - - Buy LUX - - - - 0.00000000 BTC - - - - Bids: 0000 - - - - Supply: 0.00000000 LUX - - - - Sell LUX - - - - Demand: 0.00000000 LUX - - - - LUX - - - - Max - - - - Asks: 0000 - - - - Units - - - - BTC Available: - - - - LUX Available: - - - - 0.00000000 - - - - LUX - - - - Send - - - - Lowest price: - - - - Amount in LUX: - - - - Total w/ Fees : - - - - <html><head/><body><p><span style=" font-size:9pt; font-weight:600;">Warning:</span><span style=" font-size:9pt;"> This feature is in </span><span style=" font-size:9pt; font-weight:600;">ALPHA ! USE AT OWN RISK !</span></p></body></html> - - - - <html><head/><body><p align="center"><span style=" font-weight:600; text-decoration: underline;">Instructions:</span></p><p align="center">To use the cross sending feature you need to have </p><p align="center">LUX available to spend on Cryptopia. If you don't have any </p><p align="center">you can find your deposit address on the &quot;Balance&quot; tab.</p><p align="center">1. Enter the amount you want to receive in Bitcoin.</p><p align="center">2. Enter the Bitcoin address you are sending to.</p><p align="center">3. Check that the Total with fee's is correct.</p><p align="center">4. Press send and watch the magic happen.</p><p align="center"><span style=" font-weight:600; text-decoration: underline;">Notes.</span></p><p align="center"><span style=" font-size:7pt;">Total w/ fees: N/A means you dont have enough LUX to sell !</span></p><p align="center"><span style=" font-size:7pt;">All trades are done through Cryptopia using your own balance and API keys.</span></p><p align="center"><span style=" font-size:7pt;">Encrypt and backup your wallet when using this feature.</span></p><p align="center"><span style=" font-size:7pt;">If you don't have a password you Cryptopia account will be accessible 24/7</span></p><p align="center"><span style=" font-size:7pt;">Withdrawal fee of 0.002 and 0.25% taken by Cryptopia.</span></p></body></html> - - - - Amount: - Amount: - - - Address: - Address: - - - LUX Balance: - - - - BTC Balance: - - - - Paste from clipboard - - - - Alt+P - Alt+P - - - Cross-Send - - - - Market History - - - - Open Orders - - - - Trade history - - - - Balance - - - - LUX Pending: - - - - BTC Pending: - - - - Generate LUX Coin Deposit Address - - - - Deposit Address: - - - - Copy to clipboard - - - - Withdraw LUX: - - - - Withdraw - - - - Settings - - - - API Key - - - - Secret Key - - - - Password - - - - Load API Keys - - - - Update API Keys - - - - Save API Keys - - - - <html><head/><body><p>Loading keys:</p><p>1) Enter Password</p><p>2) Load API Keys</p><p>3) Start trading on Cryptopia</p></body></html> - - - - <html><head/><body><p>Saving keys:</p><p>1) Enter in API Keys found at <a href="https://Cryptopia.co.nz/"><span style=" text-decoration: underline; color:#0000ff;">Cryptopia</span></a></p><p>2) Enter Password</p><p>3) Save API Keys</p><p>4) Start trading on Cryptopia</p></body></html> - - - - Cancel Order - - - - Supply: - - - - Ask's: - - - - Demand: - - - - Bid's: - - - - SUM(BTC) - - - - TOTAL(BTC) - - - - LUX(SIZE) - - - - BID(BTC) - - - - ASK(BTC) - - - - DATE - - - - BUY/SELL - - - - BID/ASK - - - - TOTAL UNITS(LUX) - - - - TOTAL COST(BTC) - - - - Date Time - - - - Exchange - - - - OrderType - - - - QTY - - - - Price - - - - PricePerUnit - - - - OrderId - - - - QTY_Rem - - - - Ask: - - - - Bid: - - - - LUX Volume: - - - - BTC Volume: - - - - Time (GMT) - - - - LUX Price in BTC - - - - API Configuration Failed - - - - Api configuration was unsuccesful. - - - - API Configuration Complete - - - - Your API keys have been loaded and the connection has been successfully configured and tested. - - - - Your API keys have been saved and the connection has been successfully configured and tested. - - - - Api connection has been successfully configured and tested. - - - - Error - Error - - - Your password is too short! - - - diff --git a/src/qt/locale/lux_es.ts b/src/qt/locale/lux_es.ts index 6aa69c7f..defe0a11 100755 --- a/src/qt/locale/lux_es.ts +++ b/src/qt/locale/lux_es.ts @@ -980,14 +980,6 @@ MultiEnvío: %1 Check for updates - - &Trading - - - - Trading on Cryptopia - - &LSR Token @@ -1124,7 +1116,7 @@ MultiEnvío: %1 EtiquetaDeTexto - Not all transactions will be shown. To view all transactions you need to set txindex=1 in the configuration file (lux.conf). + Not all transactions will be shown and block explorer is not available while running in pruned mode. To view all transactions you need to set txindex=1 in the configuration file (lux.conf). No se muestran todas las transacciones. Para ver todas las transacciones introduzca la línea "txindex=1" en el archivo de configuración (lux.conf). @@ -8011,379 +8003,4 @@ https://www.transifex.com/luxcore/luxcore - - tradingDialog - - Dialog - - - - 0.00000000 - 0.00000000 - - - 0.000000000 - 0.000000000 - - - Trade - - - - Bid - - - - BTC - - - - Total w/ 0.25% Fee - - - - 0.00000000 - - - - BTC - - - - Buy LUX - - - - 0.00000000 BTC - - - - Bids: 0000 - - - - Supply: 0.00000000 LUX - - - - Sell LUX - - - - Demand: 0.00000000 LUX - - - - LUX - - - - Max - - - - Asks: 0000 - - - - Units - - - - BTC Available: - - - - LUX Available: - - - - 0.00000000 - - - - LUX - - - - Send - - - - Lowest price: - - - - Amount in LUX: - - - - Total w/ Fees : - - - - <html><head/><body><p><span style=" font-size:9pt; font-weight:600;">Warning:</span><span style=" font-size:9pt;"> This feature is in </span><span style=" font-size:9pt; font-weight:600;">ALPHA ! USE AT OWN RISK !</span></p></body></html> - - - - <html><head/><body><p align="center"><span style=" font-weight:600; text-decoration: underline;">Instructions:</span></p><p align="center">To use the cross sending feature you need to have </p><p align="center">LUX available to spend on Cryptopia. If you don't have any </p><p align="center">you can find your deposit address on the &quot;Balance&quot; tab.</p><p align="center">1. Enter the amount you want to receive in Bitcoin.</p><p align="center">2. Enter the Bitcoin address you are sending to.</p><p align="center">3. Check that the Total with fee's is correct.</p><p align="center">4. Press send and watch the magic happen.</p><p align="center"><span style=" font-weight:600; text-decoration: underline;">Notes.</span></p><p align="center"><span style=" font-size:7pt;">Total w/ fees: N/A means you dont have enough LUX to sell !</span></p><p align="center"><span style=" font-size:7pt;">All trades are done through Cryptopia using your own balance and API keys.</span></p><p align="center"><span style=" font-size:7pt;">Encrypt and backup your wallet when using this feature.</span></p><p align="center"><span style=" font-size:7pt;">If you don't have a password you Cryptopia account will be accessible 24/7</span></p><p align="center"><span style=" font-size:7pt;">Withdrawal fee of 0.002 and 0.25% taken by Cryptopia.</span></p></body></html> - - - - Amount: - Cantidad: - - - Address: - Dirección: - - - LUX Balance: - - - - BTC Balance: - - - - Paste from clipboard - - - - Alt+P - Alt + P - - - Cross-Send - - - - Market History - - - - Open Orders - - - - Trade history - - - - Balance - - - - LUX Pending: - - - - BTC Pending: - - - - Generate LUX Coin Deposit Address - - - - Deposit Address: - - - - Copy to clipboard - - - - Withdraw LUX: - - - - Withdraw - - - - Settings - - - - API Key - - - - Secret Key - - - - Password - - - - Load API Keys - - - - Update API Keys - - - - Save API Keys - - - - <html><head/><body><p>Loading keys:</p><p>1) Enter Password</p><p>2) Load API Keys</p><p>3) Start trading on Cryptopia</p></body></html> - - - - <html><head/><body><p>Saving keys:</p><p>1) Enter in API Keys found at <a href="https://Cryptopia.co.nz/"><span style=" text-decoration: underline; color:#0000ff;">Cryptopia</span></a></p><p>2) Enter Password</p><p>3) Save API Keys</p><p>4) Start trading on Cryptopia</p></body></html> - - - - Cancel Order - - - - Supply: - - - - Ask's: - - - - Demand: - - - - Bid's: - - - - SUM(BTC) - - - - TOTAL(BTC) - - - - LUX(SIZE) - - - - BID(BTC) - - - - ASK(BTC) - - - - DATE - - - - BUY/SELL - - - - BID/ASK - - - - TOTAL UNITS(LUX) - - - - TOTAL COST(BTC) - - - - Date Time - - - - Exchange - - - - OrderType - - - - QTY - - - - Price - - - - PricePerUnit - - - - OrderId - - - - QTY_Rem - - - - Ask: - - - - Bid: - - - - LUX Volume: - - - - BTC Volume: - - - - Time (GMT) - - - - LUX Price in BTC - - - - API Configuration Failed - - - - Api configuration was unsuccesful. - - - - API Configuration Complete - - - - Your API keys have been loaded and the connection has been successfully configured and tested. - - - - Your API keys have been saved and the connection has been successfully configured and tested. - - - - Api connection has been successfully configured and tested. - - - - Error - Error - - - Your password is too short! - - - diff --git a/src/qt/locale/lux_fr.ts b/src/qt/locale/lux_fr.ts index e80696b0..d3017c4a 100755 --- a/src/qt/locale/lux_fr.ts +++ b/src/qt/locale/lux_fr.ts @@ -607,7 +607,7 @@ Cliquer sur "Crypter la clé" pour signer et encrypter la clé privée &Unlock Wallet... - Déverro&uiller le portefeuille + &Déverrouiller le portefeuille Unlock wallet @@ -615,7 +615,7 @@ Cliquer sur "Crypter la clé" pour signer et encrypter la clé privée &Lock Wallet - Verroui&ller le portefeuille + &Verrouiller le portefeuille &Backup Wallet... @@ -890,14 +890,6 @@ MultiSend: %1 Check for updates Rechercher mise à jour - - &Trading - &Trading - - - Trading on Cryptopia - Trading sur Cryptopia - &Smart Contracts &Smart Contrats @@ -1055,7 +1047,7 @@ MultiSend: %1 Wallet is <b>encrypted</b> and currently <b>unlocked</b> for anonymization and staking only - Le portefeuille est <b>encrypté</b> et <b>dévérouillé</b> pour l'anonymisation et le PoS + Le portefeuille est <b>encrypté</b> et <b>déverrouillé</b> pour l'anonymisation et le PoS A fatal error occurred. LUX can no longer continue safely and will quit. @@ -1081,8 +1073,8 @@ MultiSend: %1 Chercher - Not all transactions will be shown. To view all transactions you need to set txindex=1 in the configuration file (lux.conf). - Toutes les transaction ne seront pas affichés. Pour voir toutes les transactions, vous devez régler txindex=1 dans le fichier de configuration (lux.conf). + Not all transactions will be shown and block explorer is not available while running in pruned mode. To view all transactions you need to set txindex=1 in the configuration file (lux.conf). + Certaines transactions ne seront pas affichées. Pour voir toutes les transactions, vous devez définir txindex=1 dans le fichier de configuration (lux.conf). Blockchain Explorer @@ -1511,11 +1503,11 @@ MultiSend: %1 toggle lock state - (Dé)vérouiller + (Dé)verrouiller (1 locked) - (1 vérouillé) + (1 verrouillé) Received with label @@ -1535,7 +1527,7 @@ MultiSend: %1 Unlock unspent - Dévérouiller entrée + Déverrouiller entrée Copy bytes @@ -3504,7 +3496,7 @@ https://www.transifex.com/luxcore/luxcore Wallet is locked and user declined to unlock. Disabling Darksend. - Le portefeuille est toujours vérouillé. Désactivation de Luxsend. + Le portefeuille est toujours verrouillé. Désactivation de Luxsend. @@ -4915,7 +4907,7 @@ https://www.transifex.com/luxcore/luxcore Error: The wallet was unlocked only to anonymize and stake coins. - Erreur: Le portefeuille n'est dévérouillé que pour l'anonymisation et le PoS. + Erreur: Le portefeuille n'est déverrouillé que pour l'anonymisation et le PoS. A fee %1 times higher than %2 per kB is considered an insanely high fee. @@ -4923,7 +4915,7 @@ https://www.transifex.com/luxcore/luxcore Error: The wallet was unlocked only to anonymize coins. Unlock canceled. - Erreur: Le portefeuille n'est dévérouillé que pour l'anonymisation. Dévérouillage annulé. + Erreur: Le portefeuille n'est déverrouillé que pour l'anonymisation. Déverrouillage annulé. Warning: Invalid LUX address @@ -7805,379 +7797,4 @@ https://www.transifex.com/luxcore/luxcore - - tradingDialog - - Dialog - Dialog - - - 0.00000000 - 0.00000000 - - - 0.000000000 - 0.000000000 - - - Trade - Echanger - - - Bid - Prix - - - BTC - BTC - - - Total w/ 0.25% Fee - Total après frais (0.25%) - - - 0.00000000 - 0.00000000 - - - Buy LUX - Acheter des LUX - - - 0.00000000 BTC - 0.00000000 BTC - - - Bids: 0000 - Achats: 0000 - - - Supply: 0.00000000 LUX - Offre : 0.00000000 LUX - - - Sell LUX - Vendre des LUX - - - Demand: 0.00000000 LUX - Demande : 0.00000000 LUX - - - LUX - LUX - - - Max - Max - - - Asks: 0000 - Ventes: 0000 - - - Units - Unités - - - BTC Available: - BTC disponibles : - - - LUX Available: - LUX disponibles : - - - Send - Envoyer - - - Lowest price: - Plus bas prix : - - - Amount in LUX: - Montant en LUX : - - - Total w/ Fees : - Total après frais : - - - <html><head/><body><p><span style=" font-size:9pt; font-weight:600;">Warning:</span><span style=" font-size:9pt;"> This feature is in </span><span style=" font-size:9pt; font-weight:600;">ALPHA ! USE AT OWN RISK !</span></p></body></html> - <html><head/><body><p><span style=" font-size:9pt; font-weight:600;">Attention:</span><span style=" font-size:9pt;"> Cette fonctionnalité est en </span><span style=" font-size:9pt; font-weight:600;">ALPHA ! UTILISEZ LA A VOS RISQUES !</span></p></body></html> - - - <html><head/><body><p align="center"><span style=" font-weight:600; text-decoration: underline;">Instructions:</span></p><p align="center">To use the cross sending feature you need to have </p><p align="center">LUX available to spend on Cryptopia. If you don't have any </p><p align="center">you can find your deposit address on the &quot;Balance&quot; tab.</p><p align="center">1. Enter the amount you want to receive in Bitcoin.</p><p align="center">2. Enter the Bitcoin address you are sending to.</p><p align="center">3. Check that the Total with fee's is correct.</p><p align="center">4. Press send and watch the magic happen.</p><p align="center"><span style=" font-weight:600; text-decoration: underline;">Notes.</span></p><p align="center"><span style=" font-size:7pt;">Total w/ fees: N/A means you dont have enough LUX to sell !</span></p><p align="center"><span style=" font-size:7pt;">All trades are done through Cryptopia using your own balance and API keys.</span></p><p align="center"><span style=" font-size:7pt;">Encrypt and backup your wallet when using this feature.</span></p><p align="center"><span style=" font-size:7pt;">If you don't have a password you Cryptopia account will be accessible 24/7</span></p><p align="center"><span style=" font-size:7pt;">Withdrawal fee of 0.002 and 0.25% taken by Cryptopia.</span></p></body></html> - - - - Amount: - Montant : - - - Address: - Adresse : - - - LUX Balance: - Balance LUX : - - - BTC Balance: - Balance BTC : - - - Paste from clipboard - Coller depuis presse-papier - - - Alt+P - Alt+P - - - Cross-Send - - - - Market History - Historique Marché - - - Open Orders - Ordres ouverts - - - Trade history - Transactions - - - Balance - Balance - - - LUX Pending: - LUX en attente : - - - BTC Pending: - BTC en attente : - - - Generate LUX Coin Deposit Address - Générer adresse LUX de dépot - - - Deposit Address: - Adresse de dépot LUX : - - - Copy to clipboard - Copier vers presse-papier - - - Withdraw LUX: - Rapatrier des LUX : - - - Withdraw - Rapatrier - - - Settings - Paramètres - - - API Key - Clé API - - - Secret Key - Clé secrète - - - Password - Mot de passe - - - Load API Keys - Charger clés - - - Update API Keys - Tester les clés - - - Save API Keys - Enregistrer clés - - - <html><head/><body><p>Loading keys:</p><p>1) Enter Password</p><p>2) Load API Keys</p><p>3) Start trading on Cryptopia</p></body></html> - <html><head/><body><p>Chargement des clés:</p><p>1) Entrer le mot de passe </p><p>2) Charger les clés API</p><p>3) Echanger sur Cryptopia</p></body></html> - - - <html><head/><body><p>Saving keys:</p><p>1) Enter in API Keys found at <a href="https://Cryptopia.co.nz/"><span style=" text-decoration: underline; color:#0000ff;">Cryptopia</span></a></p><p>2) Enter Password</p><p>3) Save API Keys</p><p>4) Start trading on Cryptopia</p></body></html> - <html><head/><body><p>Enregistrement des clés:</p><p>1) Saisir les clés API fournies par <a href="https://Cryptopia.co.nz/"><span style=" text-decoration: underline; color:#0000ff;">Cryptopia</span></a></p><p>2) Entrer un mot de passe</p><p>3) Enregistrer les clés API</p><p>4) Echanger sur Cryptopia</p></body></html> - - - Cancel Order - Annuler Ordre - - - BTC - BTC - - - 0.00000000 - 0.00000000 - - - LUX - LUX - - - Supply: - Offre : - - - Ask's: - En vente : - - - Demand: - Demande : - - - Bid's: - Ordres d'achat : - - - SUM(BTC) - Somme BTC - - - TOTAL(BTC) - Total BTC - - - LUX(SIZE) - Quantité LUX - - - BID(BTC) - Prix BTC - - - ASK(BTC) - Prix BTC - - - DATE - Date - - - BUY/SELL - Type - - - BID/ASK - Prix - - - TOTAL UNITS(LUX) - Total LUX - - - TOTAL COST(BTC) - Total BTC - - - Date Time - Date Heure - - - Exchange - Marché - - - OrderType - Type - - - QTY - Qté - - - Price - Prix - - - PricePerUnit - Prix - - - OrderId - ID Ordre - - - QTY_Rem - Reste - - - Ask: - Demande : - - - Bid: - Offre : - - - LUX Volume: - Volume LUX : - - - BTC Volume: - Volume BTC : - - - Time (GMT) - Heure (GMT) - - - LUX Price in BTC - LUX en BTC - - - API Configuration Failed - Echec configuration API - - - Api configuration was unsuccesful. - La configuration API a échoué. - - - API Configuration Complete - Configuration API - - - Your API keys have been loaded and the connection has been successfully configured and tested. - Vos clés API on été chargées et la connexion a été correctement configurée et testée. - - - Your API keys have been saved and the connection has been successfully configured and tested. - Vos clés API ont été enregistrées et la connexion a été correctement configurée et testée. - - - Api connection has been successfully configured and tested. - La connexion API a été correctement configurée et testée. - - - Error - Erreur - - - Your password is too short! - Votre mot de passe est trop court ! - - diff --git a/src/qt/locale/lux_it.ts b/src/qt/locale/lux_it.ts index 2e2d3ad6..a5b28374 100755 --- a/src/qt/locale/lux_it.ts +++ b/src/qt/locale/lux_it.ts @@ -841,14 +841,6 @@ MultiSend: %1 Check for updates - - &Trading - - - - Trading on Cryptopia - - &LSR Token @@ -1105,7 +1097,7 @@ MultiSend: %1 - Not all transactions will be shown. To view all transactions you need to set txindex=1 in the configuration file (lux.conf). + Not all transactions will be shown and block explorer is not available while running in pruned mode. To view all transactions you need to set txindex=1 in the configuration file (lux.conf). @@ -7774,379 +7766,4 @@ https://www.transifex.com/luxcore/luxcore - - tradingDialog - - Dialog - - - - 0.00000000 - - - - 0.000000000 - - - - Trade - - - - Bid - - - - BTC - - - - Total w/ 0.25% Fee - - - - 0.00000000 - - - - BTC - - - - Buy LUX - - - - 0.00000000 BTC - - - - Bids: 0000 - - - - Supply: 0.00000000 LUX - - - - Sell LUX - - - - Demand: 0.00000000 LUX - - - - LUX - - - - Max - - - - Asks: 0000 - - - - Units - - - - BTC Available: - - - - LUX Available: - - - - 0.00000000 - - - - LUX - - - - Send - - - - Lowest price: - - - - Amount in LUX: - - - - Total w/ Fees : - - - - <html><head/><body><p><span style=" font-size:9pt; font-weight:600;">Warning:</span><span style=" font-size:9pt;"> This feature is in </span><span style=" font-size:9pt; font-weight:600;">ALPHA ! USE AT OWN RISK !</span></p></body></html> - - - - <html><head/><body><p align="center"><span style=" font-weight:600; text-decoration: underline;">Instructions:</span></p><p align="center">To use the cross sending feature you need to have </p><p align="center">LUX available to spend on Cryptopia. If you don't have any </p><p align="center">you can find your deposit address on the &quot;Balance&quot; tab.</p><p align="center">1. Enter the amount you want to receive in Bitcoin.</p><p align="center">2. Enter the Bitcoin address you are sending to.</p><p align="center">3. Check that the Total with fee's is correct.</p><p align="center">4. Press send and watch the magic happen.</p><p align="center"><span style=" font-weight:600; text-decoration: underline;">Notes.</span></p><p align="center"><span style=" font-size:7pt;">Total w/ fees: N/A means you dont have enough LUX to sell !</span></p><p align="center"><span style=" font-size:7pt;">All trades are done through Cryptopia using your own balance and API keys.</span></p><p align="center"><span style=" font-size:7pt;">Encrypt and backup your wallet when using this feature.</span></p><p align="center"><span style=" font-size:7pt;">If you don't have a password you Cryptopia account will be accessible 24/7</span></p><p align="center"><span style=" font-size:7pt;">Withdrawal fee of 0.002 and 0.25% taken by Cryptopia.</span></p></body></html> - - - - Amount: - - - - Address: - Indirizzo: - - - LUX Balance: - - - - BTC Balance: - - - - Paste from clipboard - - - - Alt+P - Alt+P - - - Cross-Send - - - - Market History - - - - Open Orders - - - - Trade history - - - - Balance - - - - LUX Pending: - - - - BTC Pending: - - - - Generate LUX Coin Deposit Address - - - - Deposit Address: - - - - Copy to clipboard - - - - Withdraw LUX: - - - - Withdraw - - - - Settings - - - - API Key - - - - Secret Key - - - - Password - - - - Load API Keys - - - - Update API Keys - - - - Save API Keys - - - - <html><head/><body><p>Loading keys:</p><p>1) Enter Password</p><p>2) Load API Keys</p><p>3) Start trading on Cryptopia</p></body></html> - - - - <html><head/><body><p>Saving keys:</p><p>1) Enter in API Keys found at <a href="https://Cryptopia.co.nz/"><span style=" text-decoration: underline; color:#0000ff;">Cryptopia</span></a></p><p>2) Enter Password</p><p>3) Save API Keys</p><p>4) Start trading on Cryptopia</p></body></html> - - - - Cancel Order - - - - Supply: - - - - Ask's: - - - - Demand: - - - - Bid's: - - - - SUM(BTC) - - - - TOTAL(BTC) - - - - LUX(SIZE) - - - - BID(BTC) - - - - ASK(BTC) - - - - DATE - - - - BUY/SELL - - - - BID/ASK - - - - TOTAL UNITS(LUX) - - - - TOTAL COST(BTC) - - - - Date Time - - - - Exchange - - - - OrderType - - - - QTY - - - - Price - - - - PricePerUnit - - - - OrderId - - - - QTY_Rem - - - - Ask: - - - - Bid: - - - - LUX Volume: - - - - BTC Volume: - - - - Time (GMT) - - - - LUX Price in BTC - - - - API Configuration Failed - - - - Api configuration was unsuccesful. - - - - API Configuration Complete - - - - Your API keys have been loaded and the connection has been successfully configured and tested. - - - - Your API keys have been saved and the connection has been successfully configured and tested. - - - - Api connection has been successfully configured and tested. - - - - Error - Errore - - - Your password is too short! - - - diff --git a/src/qt/locale/lux_ja.ts b/src/qt/locale/lux_ja.ts index c742cd01..c02ced98 100755 --- a/src/qt/locale/lux_ja.ts +++ b/src/qt/locale/lux_ja.ts @@ -578,14 +578,6 @@ Browse transaction history - - &Trading - - - - Trading on Cryptopia - - &LSR Token @@ -1085,7 +1077,7 @@ - Not all transactions will be shown. To view all transactions you need to set txindex=1 in the configuration file (lux.conf). + Not all transactions will be shown and block explorer is not available while running in pruned mode. To view all transactions you need to set txindex=1 in the configuration file (lux.conf). @@ -7735,379 +7727,4 @@ https://www.transifex.com/luxcore/luxcore - - tradingDialog - - Dialog - - - - 0.00000000 - - - - 0.000000000 - - - - Trade - - - - Bid - - - - BTC - - - - Total w/ 0.25% Fee - - - - 0.00000000 - - - - BTC - - - - Buy LUX - - - - 0.00000000 BTC - - - - Bids: 0000 - - - - Supply: 0.00000000 LUX - - - - Sell LUX - - - - Demand: 0.00000000 LUX - - - - LUX - - - - Max - - - - Asks: 0000 - - - - Units - - - - BTC Available: - - - - LUX Available: - - - - 0.00000000 - - - - LUX - - - - Send - - - - Lowest price: - - - - Amount in LUX: - - - - Total w/ Fees : - - - - <html><head/><body><p><span style=" font-size:9pt; font-weight:600;">Warning:</span><span style=" font-size:9pt;"> This feature is in </span><span style=" font-size:9pt; font-weight:600;">ALPHA ! USE AT OWN RISK !</span></p></body></html> - - - - <html><head/><body><p align="center"><span style=" font-weight:600; text-decoration: underline;">Instructions:</span></p><p align="center">To use the cross sending feature you need to have </p><p align="center">LUX available to spend on Cryptopia. If you don't have any </p><p align="center">you can find your deposit address on the &quot;Balance&quot; tab.</p><p align="center">1. Enter the amount you want to receive in Bitcoin.</p><p align="center">2. Enter the Bitcoin address you are sending to.</p><p align="center">3. Check that the Total with fee's is correct.</p><p align="center">4. Press send and watch the magic happen.</p><p align="center"><span style=" font-weight:600; text-decoration: underline;">Notes.</span></p><p align="center"><span style=" font-size:7pt;">Total w/ fees: N/A means you dont have enough LUX to sell !</span></p><p align="center"><span style=" font-size:7pt;">All trades are done through Cryptopia using your own balance and API keys.</span></p><p align="center"><span style=" font-size:7pt;">Encrypt and backup your wallet when using this feature.</span></p><p align="center"><span style=" font-size:7pt;">If you don't have a password you Cryptopia account will be accessible 24/7</span></p><p align="center"><span style=" font-size:7pt;">Withdrawal fee of 0.002 and 0.25% taken by Cryptopia.</span></p></body></html> - - - - Amount: - - - - Address: - アドレス: - - - LUX Balance: - - - - BTC Balance: - - - - Paste from clipboard - - - - Alt+P - - - - Cross-Send - - - - Market History - - - - Open Orders - - - - Trade history - - - - Balance - - - - LUX Pending: - - - - BTC Pending: - - - - Generate LUX Coin Deposit Address - - - - Deposit Address: - - - - Copy to clipboard - - - - Withdraw LUX: - - - - Withdraw - - - - Settings - - - - API Key - - - - Secret Key - - - - Password - - - - Load API Keys - - - - Update API Keys - - - - Save API Keys - - - - <html><head/><body><p>Loading keys:</p><p>1) Enter Password</p><p>2) Load API Keys</p><p>3) Start trading on Cryptopia</p></body></html> - - - - <html><head/><body><p>Saving keys:</p><p>1) Enter in API Keys found at <a href="https://Cryptopia.co.nz/"><span style=" text-decoration: underline; color:#0000ff;">Cryptopia</span></a></p><p>2) Enter Password</p><p>3) Save API Keys</p><p>4) Start trading on Cryptopia</p></body></html> - - - - Cancel Order - - - - Supply: - - - - Ask's: - - - - Demand: - - - - Bid's: - - - - SUM(BTC) - - - - TOTAL(BTC) - - - - LUX(SIZE) - - - - BID(BTC) - - - - ASK(BTC) - - - - DATE - - - - BUY/SELL - - - - BID/ASK - - - - TOTAL UNITS(LUX) - - - - TOTAL COST(BTC) - - - - Date Time - - - - Exchange - - - - OrderType - - - - QTY - - - - Price - - - - PricePerUnit - - - - OrderId - - - - QTY_Rem - - - - Ask: - - - - Bid: - - - - LUX Volume: - - - - BTC Volume: - - - - Time (GMT) - - - - LUX Price in BTC - - - - API Configuration Failed - - - - Api configuration was unsuccesful. - - - - API Configuration Complete - - - - Your API keys have been loaded and the connection has been successfully configured and tested. - - - - Your API keys have been saved and the connection has been successfully configured and tested. - - - - Api connection has been successfully configured and tested. - - - - Error - - - - Your password is too short! - - - diff --git a/src/qt/locale/lux_pt.ts b/src/qt/locale/lux_pt.ts index 9c80fdee..0790d6cf 100755 --- a/src/qt/locale/lux_pt.ts +++ b/src/qt/locale/lux_pt.ts @@ -586,14 +586,6 @@ Browse transaction history - - &Trading - - - - Trading on Cryptopia - - &LSR Token @@ -1095,7 +1087,7 @@ - Not all transactions will be shown. To view all transactions you need to set txindex=1 in the configuration file (lux.conf). + Not all transactions will be shown and block explorer is not available while running in pruned mode. To view all transactions you need to set txindex=1 in the configuration file (lux.conf). @@ -7760,379 +7752,4 @@ https://www.transifex.com/luxcore/luxcore - - tradingDialog - - Dialog - - - - 0.00000000 - - - - 0.000000000 - - - - Trade - - - - Bid - - - - BTC - - - - Total w/ 0.25% Fee - - - - 0.00000000 - - - - BTC - - - - Buy LUX - - - - 0.00000000 BTC - - - - Bids: 0000 - - - - Supply: 0.00000000 LUX - - - - Sell LUX - - - - Demand: 0.00000000 LUX - - - - LUX - - - - Max - - - - Asks: 0000 - - - - Units - - - - BTC Available: - - - - LUX Available: - - - - 0.00000000 - - - - LUX - - - - Send - - - - Lowest price: - - - - Amount in LUX: - - - - Total w/ Fees : - - - - <html><head/><body><p><span style=" font-size:9pt; font-weight:600;">Warning:</span><span style=" font-size:9pt;"> This feature is in </span><span style=" font-size:9pt; font-weight:600;">ALPHA ! USE AT OWN RISK !</span></p></body></html> - - - - <html><head/><body><p align="center"><span style=" font-weight:600; text-decoration: underline;">Instructions:</span></p><p align="center">To use the cross sending feature you need to have </p><p align="center">LUX available to spend on Cryptopia. If you don't have any </p><p align="center">you can find your deposit address on the &quot;Balance&quot; tab.</p><p align="center">1. Enter the amount you want to receive in Bitcoin.</p><p align="center">2. Enter the Bitcoin address you are sending to.</p><p align="center">3. Check that the Total with fee's is correct.</p><p align="center">4. Press send and watch the magic happen.</p><p align="center"><span style=" font-weight:600; text-decoration: underline;">Notes.</span></p><p align="center"><span style=" font-size:7pt;">Total w/ fees: N/A means you dont have enough LUX to sell !</span></p><p align="center"><span style=" font-size:7pt;">All trades are done through Cryptopia using your own balance and API keys.</span></p><p align="center"><span style=" font-size:7pt;">Encrypt and backup your wallet when using this feature.</span></p><p align="center"><span style=" font-size:7pt;">If you don't have a password you Cryptopia account will be accessible 24/7</span></p><p align="center"><span style=" font-size:7pt;">Withdrawal fee of 0.002 and 0.25% taken by Cryptopia.</span></p></body></html> - - - - Amount: - - - - Address: - - - - LUX Balance: - - - - BTC Balance: - - - - Paste from clipboard - - - - Alt+P - - - - Cross-Send - - - - Market History - - - - Open Orders - - - - Trade history - - - - Balance - - - - LUX Pending: - - - - BTC Pending: - - - - Generate LUX Coin Deposit Address - - - - Deposit Address: - - - - Copy to clipboard - - - - Withdraw LUX: - - - - Withdraw - - - - Settings - - - - API Key - - - - Secret Key - - - - Password - - - - Load API Keys - - - - Update API Keys - - - - Save API Keys - - - - <html><head/><body><p>Loading keys:</p><p>1) Enter Password</p><p>2) Load API Keys</p><p>3) Start trading on Cryptopia</p></body></html> - - - - <html><head/><body><p>Saving keys:</p><p>1) Enter in API Keys found at <a href="https://Cryptopia.co.nz/"><span style=" text-decoration: underline; color:#0000ff;">Cryptopia</span></a></p><p>2) Enter Password</p><p>3) Save API Keys</p><p>4) Start trading on Cryptopia</p></body></html> - - - - Cancel Order - - - - Supply: - - - - Ask's: - - - - Demand: - - - - Bid's: - - - - SUM(BTC) - - - - TOTAL(BTC) - - - - LUX(SIZE) - - - - BID(BTC) - - - - ASK(BTC) - - - - DATE - - - - BUY/SELL - - - - BID/ASK - - - - TOTAL UNITS(LUX) - - - - TOTAL COST(BTC) - - - - Date Time - - - - Exchange - - - - OrderType - - - - QTY - - - - Price - - - - PricePerUnit - - - - OrderId - - - - QTY_Rem - - - - Ask: - - - - Bid: - - - - LUX Volume: - - - - BTC Volume: - - - - Time (GMT) - - - - LUX Price in BTC - - - - API Configuration Failed - - - - Api configuration was unsuccesful. - - - - API Configuration Complete - - - - Your API keys have been loaded and the connection has been successfully configured and tested. - - - - Your API keys have been saved and the connection has been successfully configured and tested. - - - - Api connection has been successfully configured and tested. - - - - Error - - - - Your password is too short! - - - diff --git a/src/qt/locale/lux_ro_RO.ts b/src/qt/locale/lux_ro_RO.ts index 1d94de48..36841eac 100755 --- a/src/qt/locale/lux_ro_RO.ts +++ b/src/qt/locale/lux_ro_RO.ts @@ -578,14 +578,6 @@ Browse transaction history - - &Trading - - - - Trading on Cryptopia - - &LSR Token @@ -1097,7 +1089,7 @@ - Not all transactions will be shown. To view all transactions you need to set txindex=1 in the configuration file (lux.conf). + Not all transactions will be shown and block explorer is not available while running in pruned mode. To view all transactions you need to set txindex=1 in the configuration file (lux.conf). @@ -7770,379 +7762,4 @@ https://www.transifex.com/luxcore/luxcore - - tradingDialog - - Dialog - - - - 0.00000000 - - - - 0.000000000 - - - - Trade - - - - Bid - - - - BTC - - - - Total w/ 0.25% Fee - - - - 0.00000000 - - - - BTC - - - - Buy LUX - - - - 0.00000000 BTC - - - - Bids: 0000 - - - - Supply: 0.00000000 LUX - - - - Sell LUX - - - - Demand: 0.00000000 LUX - - - - LUX - - - - Max - - - - Asks: 0000 - - - - Units - - - - BTC Available: - - - - LUX Available: - - - - 0.00000000 - - - - LUX - - - - Send - - - - Lowest price: - - - - Amount in LUX: - - - - Total w/ Fees : - - - - <html><head/><body><p><span style=" font-size:9pt; font-weight:600;">Warning:</span><span style=" font-size:9pt;"> This feature is in </span><span style=" font-size:9pt; font-weight:600;">ALPHA ! USE AT OWN RISK !</span></p></body></html> - - - - <html><head/><body><p align="center"><span style=" font-weight:600; text-decoration: underline;">Instructions:</span></p><p align="center">To use the cross sending feature you need to have </p><p align="center">LUX available to spend on Cryptopia. If you don't have any </p><p align="center">you can find your deposit address on the &quot;Balance&quot; tab.</p><p align="center">1. Enter the amount you want to receive in Bitcoin.</p><p align="center">2. Enter the Bitcoin address you are sending to.</p><p align="center">3. Check that the Total with fee's is correct.</p><p align="center">4. Press send and watch the magic happen.</p><p align="center"><span style=" font-weight:600; text-decoration: underline;">Notes.</span></p><p align="center"><span style=" font-size:7pt;">Total w/ fees: N/A means you dont have enough LUX to sell !</span></p><p align="center"><span style=" font-size:7pt;">All trades are done through Cryptopia using your own balance and API keys.</span></p><p align="center"><span style=" font-size:7pt;">Encrypt and backup your wallet when using this feature.</span></p><p align="center"><span style=" font-size:7pt;">If you don't have a password you Cryptopia account will be accessible 24/7</span></p><p align="center"><span style=" font-size:7pt;">Withdrawal fee of 0.002 and 0.25% taken by Cryptopia.</span></p></body></html> - - - - Amount: - - - - Address: - - - - LUX Balance: - - - - BTC Balance: - - - - Paste from clipboard - - - - Alt+P - - - - Cross-Send - - - - Market History - - - - Open Orders - - - - Trade history - - - - Balance - - - - LUX Pending: - - - - BTC Pending: - - - - Generate LUX Coin Deposit Address - - - - Deposit Address: - - - - Copy to clipboard - - - - Withdraw LUX: - - - - Withdraw - - - - Settings - - - - API Key - - - - Secret Key - - - - Password - - - - Load API Keys - - - - Update API Keys - - - - Save API Keys - - - - <html><head/><body><p>Loading keys:</p><p>1) Enter Password</p><p>2) Load API Keys</p><p>3) Start trading on Cryptopia</p></body></html> - - - - <html><head/><body><p>Saving keys:</p><p>1) Enter in API Keys found at <a href="https://Cryptopia.co.nz/"><span style=" text-decoration: underline; color:#0000ff;">Cryptopia</span></a></p><p>2) Enter Password</p><p>3) Save API Keys</p><p>4) Start trading on Cryptopia</p></body></html> - - - - Cancel Order - - - - Supply: - - - - Ask's: - - - - Demand: - - - - Bid's: - - - - SUM(BTC) - - - - TOTAL(BTC) - - - - LUX(SIZE) - - - - BID(BTC) - - - - ASK(BTC) - - - - DATE - - - - BUY/SELL - - - - BID/ASK - - - - TOTAL UNITS(LUX) - - - - TOTAL COST(BTC) - - - - Date Time - - - - Exchange - - - - OrderType - - - - QTY - - - - Price - - - - PricePerUnit - - - - OrderId - - - - QTY_Rem - - - - Ask: - - - - Bid: - - - - LUX Volume: - - - - BTC Volume: - - - - Time (GMT) - - - - LUX Price in BTC - - - - API Configuration Failed - - - - Api configuration was unsuccesful. - - - - API Configuration Complete - - - - Your API keys have been loaded and the connection has been successfully configured and tested. - - - - Your API keys have been saved and the connection has been successfully configured and tested. - - - - Api connection has been successfully configured and tested. - - - - Error - - - - Your password is too short! - - - diff --git a/src/qt/locale/lux_ru.ts b/src/qt/locale/lux_ru.ts index 8076b2b5..4da7a306 100755 --- a/src/qt/locale/lux_ru.ts +++ b/src/qt/locale/lux_ru.ts @@ -934,14 +934,6 @@ Address: %4 Check for updates - - &Trading - - - - Trading on Cryptopia - - &LSR Token @@ -1125,7 +1117,7 @@ Address: %4 Текстовая метка - Not all transactions will be shown. To view all transactions you need to set txindex=1 in the configuration file (lux.conf). + Not all transactions will be shown and block explorer is not available while running in pruned mode. To view all transactions you need to set txindex=1 in the configuration file (lux.conf). Будут показаны не все транзакции. Для отображения всех транзакций необходимо выставить txindex=1 в конфигурационном файле (lux.conf). @@ -8038,379 +8030,4 @@ https://www.transifex.com/luxcore/luxcore - - tradingDialog - - Dialog - - - - 0.00000000 - 0.00000000 - - - 0.000000000 - 0.000000000 - - - Trade - - - - Bid - - - - BTC - - - - Total w/ 0.25% Fee - - - - 0.00000000 - - - - BTC - - - - Buy LUX - - - - 0.00000000 BTC - - - - Bids: 0000 - - - - Supply: 0.00000000 LUX - - - - Sell LUX - - - - Demand: 0.00000000 LUX - - - - LUX - - - - Max - - - - Asks: 0000 - - - - Units - - - - BTC Available: - - - - LUX Available: - - - - 0.00000000 - - - - LUX - - - - Send - - - - Lowest price: - - - - Amount in LUX: - - - - Total w/ Fees : - - - - <html><head/><body><p><span style=" font-size:9pt; font-weight:600;">Warning:</span><span style=" font-size:9pt;"> This feature is in </span><span style=" font-size:9pt; font-weight:600;">ALPHA ! USE AT OWN RISK !</span></p></body></html> - - - - <html><head/><body><p align="center"><span style=" font-weight:600; text-decoration: underline;">Instructions:</span></p><p align="center">To use the cross sending feature you need to have </p><p align="center">LUX available to spend on Cryptopia. If you don't have any </p><p align="center">you can find your deposit address on the &quot;Balance&quot; tab.</p><p align="center">1. Enter the amount you want to receive in Bitcoin.</p><p align="center">2. Enter the Bitcoin address you are sending to.</p><p align="center">3. Check that the Total with fee's is correct.</p><p align="center">4. Press send and watch the magic happen.</p><p align="center"><span style=" font-weight:600; text-decoration: underline;">Notes.</span></p><p align="center"><span style=" font-size:7pt;">Total w/ fees: N/A means you dont have enough LUX to sell !</span></p><p align="center"><span style=" font-size:7pt;">All trades are done through Cryptopia using your own balance and API keys.</span></p><p align="center"><span style=" font-size:7pt;">Encrypt and backup your wallet when using this feature.</span></p><p align="center"><span style=" font-size:7pt;">If you don't have a password you Cryptopia account will be accessible 24/7</span></p><p align="center"><span style=" font-size:7pt;">Withdrawal fee of 0.002 and 0.25% taken by Cryptopia.</span></p></body></html> - - - - Amount: - Сумма: - - - Address: - Адрес: - - - LUX Balance: - - - - BTC Balance: - - - - Paste from clipboard - - - - Alt+P - Alt+P - - - Cross-Send - - - - Market History - - - - Open Orders - - - - Trade history - - - - Balance - - - - LUX Pending: - - - - BTC Pending: - - - - Generate LUX Coin Deposit Address - - - - Deposit Address: - - - - Copy to clipboard - - - - Withdraw LUX: - - - - Withdraw - - - - Settings - - - - API Key - - - - Secret Key - - - - Password - - - - Load API Keys - - - - Update API Keys - - - - Save API Keys - - - - <html><head/><body><p>Loading keys:</p><p>1) Enter Password</p><p>2) Load API Keys</p><p>3) Start trading on Cryptopia</p></body></html> - - - - <html><head/><body><p>Saving keys:</p><p>1) Enter in API Keys found at <a href="https://Cryptopia.co.nz/"><span style=" text-decoration: underline; color:#0000ff;">Cryptopia</span></a></p><p>2) Enter Password</p><p>3) Save API Keys</p><p>4) Start trading on Cryptopia</p></body></html> - - - - Cancel Order - - - - Supply: - - - - Ask's: - - - - Demand: - - - - Bid's: - - - - SUM(BTC) - - - - TOTAL(BTC) - - - - LUX(SIZE) - - - - BID(BTC) - - - - ASK(BTC) - - - - DATE - - - - BUY/SELL - - - - BID/ASK - - - - TOTAL UNITS(LUX) - - - - TOTAL COST(BTC) - - - - Date Time - - - - Exchange - - - - OrderType - - - - QTY - - - - Price - - - - PricePerUnit - - - - OrderId - - - - QTY_Rem - - - - Ask: - - - - Bid: - - - - LUX Volume: - - - - BTC Volume: - - - - Time (GMT) - - - - LUX Price in BTC - - - - API Configuration Failed - - - - Api configuration was unsuccesful. - - - - API Configuration Complete - - - - Your API keys have been loaded and the connection has been successfully configured and tested. - - - - Your API keys have been saved and the connection has been successfully configured and tested. - - - - Api connection has been successfully configured and tested. - - - - Error - Ошибка - - - Your password is too short! - - - diff --git a/src/qt/locale/lux_vn.ts b/src/qt/locale/lux_vn.ts index e16740e5..113d7478 100755 --- a/src/qt/locale/lux_vn.ts +++ b/src/qt/locale/lux_vn.ts @@ -966,14 +966,6 @@ Send coins to a LUX address - - &Trading - - - - Trading on Cryptopia - - &LSR Token @@ -1336,7 +1328,7 @@ - Not all transactions will be shown. To view all transactions you need to set txindex=1 in the configuration file (lux.conf). + Not all transactions will be shown and block explorer is not available while running in pruned mode. To view all transactions you need to set txindex=1 in the configuration file (lux.conf). @@ -9545,379 +9537,4 @@ https://www.transifex.com/luxcore/luxcore - - tradingDialog - - Dialog - - - - 0.00000000 - 0.00000000 - - - 0.000000000 - 0.000000000 - - - Trade - - - - Bid - - - - BTC - - - - Total w/ 0.25% Fee - - - - 0.00000000 - - - - BTC - - - - Buy LUX - - - - 0.00000000 BTC - - - - Bids: 0000 - - - - Supply: 0.00000000 LUX - - - - Sell LUX - - - - Demand: 0.00000000 LUX - - - - LUX - - - - Max - - - - Asks: 0000 - - - - Units - - - - BTC Available: - - - - LUX Available: - - - - 0.00000000 - - - - LUX - - - - Send - - - - Lowest price: - - - - Amount in LUX: - - - - Total w/ Fees : - - - - <html><head/><body><p><span style=" font-size:9pt; font-weight:600;">Warning:</span><span style=" font-size:9pt;"> This feature is in </span><span style=" font-size:9pt; font-weight:600;">ALPHA ! USE AT OWN RISK !</span></p></body></html> - - - - <html><head/><body><p align="center"><span style=" font-weight:600; text-decoration: underline;">Instructions:</span></p><p align="center">To use the cross sending feature you need to have </p><p align="center">LUX available to spend on Cryptopia. If you don't have any </p><p align="center">you can find your deposit address on the &quot;Balance&quot; tab.</p><p align="center">1. Enter the amount you want to receive in Bitcoin.</p><p align="center">2. Enter the Bitcoin address you are sending to.</p><p align="center">3. Check that the Total with fee's is correct.</p><p align="center">4. Press send and watch the magic happen.</p><p align="center"><span style=" font-weight:600; text-decoration: underline;">Notes.</span></p><p align="center"><span style=" font-size:7pt;">Total w/ fees: N/A means you dont have enough LUX to sell !</span></p><p align="center"><span style=" font-size:7pt;">All trades are done through Cryptopia using your own balance and API keys.</span></p><p align="center"><span style=" font-size:7pt;">Encrypt and backup your wallet when using this feature.</span></p><p align="center"><span style=" font-size:7pt;">If you don't have a password you Cryptopia account will be accessible 24/7</span></p><p align="center"><span style=" font-size:7pt;">Withdrawal fee of 0.002 and 0.25% taken by Cryptopia.</span></p></body></html> - - - - Amount: - Số tiền: - - - Address: - - - - LUX Balance: - - - - BTC Balance: - - - - Paste from clipboard - - - - Alt+P - Alt+P - - - Cross-Send - - - - Market History - - - - Open Orders - - - - Trade history - - - - Balance - - - - LUX Pending: - - - - BTC Pending: - - - - Generate LUX Coin Deposit Address - - - - Deposit Address: - - - - Copy to clipboard - - - - Withdraw LUX: - - - - Withdraw - - - - Settings - - - - API Key - - - - Secret Key - - - - Password - - - - Load API Keys - - - - Update API Keys - - - - Save API Keys - - - - <html><head/><body><p>Loading keys:</p><p>1) Enter Password</p><p>2) Load API Keys</p><p>3) Start trading on Cryptopia</p></body></html> - - - - <html><head/><body><p>Saving keys:</p><p>1) Enter in API Keys found at <a href="https://Cryptopia.co.nz/"><span style=" text-decoration: underline; color:#0000ff;">Cryptopia</span></a></p><p>2) Enter Password</p><p>3) Save API Keys</p><p>4) Start trading on Cryptopia</p></body></html> - - - - SUM(BTC) - - - - TOTAL(BTC) - - - - LUX(SIZE) - - - - BID(BTC) - - - - ASK(BTC) - - - - DATE - - - - BUY/SELL - - - - BID/ASK - - - - TOTAL UNITS(LUX) - - - - TOTAL COST(BTC) - - - - Date Time - - - - Exchange - - - - OrderType - - - - QTY - - - - Price - - - - PricePerUnit - - - - OrderId - - - - QTY_Rem - - - - Cancel Order - - - - Ask: - - - - Bid: - - - - LUX Volume: - - - - BTC Volume: - - - - Supply: - - - - Ask's: - - - - Demand: - - - - Bid's: - - - - Time (GMT) - - - - LUX Price in BTC - - - - API Configuration Failed - - - - Api configuration was unsuccesful. - - - - API Configuration Complete - - - - Your API keys have been loaded and the connection has been successfully configured and tested. - - - - Your API keys have been saved and the connection has been successfully configured and tested. - - - - Api connection has been successfully configured and tested. - - - - Error - Lỗi - - - Your password is too short! - - - diff --git a/src/qt/locale/lux_zh_TW.ts b/src/qt/locale/lux_zh_TW.ts index 93e32486..dd7bbfb7 100755 --- a/src/qt/locale/lux_zh_TW.ts +++ b/src/qt/locale/lux_zh_TW.ts @@ -578,14 +578,6 @@ Browse transaction history - - &Trading - - - - Trading on Cryptopia - - &LSR Token @@ -1085,7 +1077,7 @@ - Not all transactions will be shown. To view all transactions you need to set txindex=1 in the configuration file (lux.conf). + Not all transactions will be shown and block explorer is not available while running in pruned mode. To view all transactions you need to set txindex=1 in the configuration file (lux.conf). @@ -7728,379 +7720,4 @@ https://www.transifex.com/luxcore/luxcore - - tradingDialog - - Dialog - - - - 0.00000000 - - - - 0.000000000 - - - - Trade - - - - Bid - - - - BTC - - - - Total w/ 0.25% Fee - - - - 0.00000000 - - - - BTC - - - - Buy LUX - - - - 0.00000000 BTC - - - - Bids: 0000 - - - - Supply: 0.00000000 LUX - - - - Sell LUX - - - - Demand: 0.00000000 LUX - - - - LUX - - - - Max - - - - Asks: 0000 - - - - Units - - - - BTC Available: - - - - LUX Available: - - - - 0.00000000 - - - - LUX - - - - Send - - - - Lowest price: - - - - Amount in LUX: - - - - Total w/ Fees : - - - - <html><head/><body><p><span style=" font-size:9pt; font-weight:600;">Warning:</span><span style=" font-size:9pt;"> This feature is in </span><span style=" font-size:9pt; font-weight:600;">ALPHA ! USE AT OWN RISK !</span></p></body></html> - - - - <html><head/><body><p align="center"><span style=" font-weight:600; text-decoration: underline;">Instructions:</span></p><p align="center">To use the cross sending feature you need to have </p><p align="center">LUX available to spend on Cryptopia. If you don't have any </p><p align="center">you can find your deposit address on the &quot;Balance&quot; tab.</p><p align="center">1. Enter the amount you want to receive in Bitcoin.</p><p align="center">2. Enter the Bitcoin address you are sending to.</p><p align="center">3. Check that the Total with fee's is correct.</p><p align="center">4. Press send and watch the magic happen.</p><p align="center"><span style=" font-weight:600; text-decoration: underline;">Notes.</span></p><p align="center"><span style=" font-size:7pt;">Total w/ fees: N/A means you dont have enough LUX to sell !</span></p><p align="center"><span style=" font-size:7pt;">All trades are done through Cryptopia using your own balance and API keys.</span></p><p align="center"><span style=" font-size:7pt;">Encrypt and backup your wallet when using this feature.</span></p><p align="center"><span style=" font-size:7pt;">If you don't have a password you Cryptopia account will be accessible 24/7</span></p><p align="center"><span style=" font-size:7pt;">Withdrawal fee of 0.002 and 0.25% taken by Cryptopia.</span></p></body></html> - - - - Amount: - - - - Address: - - - - LUX Balance: - - - - BTC Balance: - - - - Paste from clipboard - - - - Alt+P - - - - Cross-Send - - - - Market History - - - - Open Orders - - - - Trade history - - - - Balance - - - - LUX Pending: - - - - BTC Pending: - - - - Generate LUX Coin Deposit Address - - - - Deposit Address: - - - - Copy to clipboard - - - - Withdraw LUX: - - - - Withdraw - - - - Settings - - - - API Key - - - - Secret Key - - - - Password - - - - Load API Keys - - - - Update API Keys - - - - Save API Keys - - - - <html><head/><body><p>Loading keys:</p><p>1) Enter Password</p><p>2) Load API Keys</p><p>3) Start trading on Cryptopia</p></body></html> - - - - <html><head/><body><p>Saving keys:</p><p>1) Enter in API Keys found at <a href="https://Cryptopia.co.nz/"><span style=" text-decoration: underline; color:#0000ff;">Cryptopia</span></a></p><p>2) Enter Password</p><p>3) Save API Keys</p><p>4) Start trading on Cryptopia</p></body></html> - - - - Cancel Order - - - - Supply: - - - - Ask's: - - - - Demand: - - - - Bid's: - - - - SUM(BTC) - - - - TOTAL(BTC) - - - - LUX(SIZE) - - - - BID(BTC) - - - - ASK(BTC) - - - - DATE - - - - BUY/SELL - - - - BID/ASK - - - - TOTAL UNITS(LUX) - - - - TOTAL COST(BTC) - - - - Date Time - - - - Exchange - - - - OrderType - - - - QTY - - - - Price - - - - PricePerUnit - - - - OrderId - - - - QTY_Rem - - - - Ask: - - - - Bid: - - - - LUX Volume: - - - - BTC Volume: - - - - Time (GMT) - - - - LUX Price in BTC - - - - API Configuration Failed - - - - Api configuration was unsuccesful. - - - - API Configuration Complete - - - - Your API keys have been loaded and the connection has been successfully configured and tested. - - - - Your API keys have been saved and the connection has been successfully configured and tested. - - - - Api connection has been successfully configured and tested. - - - - Error - - - - Your password is too short! - - - diff --git a/src/qt/lux.cpp b/src/qt/lux.cpp index 29a61be0..eb5daa45 100755 --- a/src/qt/lux.cpp +++ b/src/qt/lux.cpp @@ -154,19 +154,30 @@ static void initTranslations(QTranslator& qtTranslatorBase, QTranslator& qtTrans QApplication::installTranslator(&translator); } -/* qDebug() message handler --> debug.log */ +/* qDebug() message handler --> debug.log + + Also includes a very basic warning suppressor, we want to use it to remove useless clutter from the debug log. It currently + suppresses warnings from broken QT functionality (QFont's setPixelSize unwarranted "warnings") + +*/ #if QT_VERSION < 0x050000 void DebugMessageHandler(QtMsgType type, const char* msg) { const char* category = (type == QtDebugMsg) ? "qt" : NULL; - LogPrint(category, "GUI: %s\n", msg); + if (msg == "QFont::setPixelSize: Pixel size <= 0 (0)") { + return; + } + else LogPrint(category, "GUI: %s\n", msg); } #else void DebugMessageHandler(QtMsgType type, const QMessageLogContext& context, const QString& msg) { Q_UNUSED(context); const char* category = (type == QtDebugMsg) ? "qt" : NULL; - LogPrint(category, "GUI: %s\n", msg.toStdString()); + if (msg == "QFont::setPixelSize: Pixel size <= 0 (0)") { + return; + } + else LogPrint(category, "GUI: %s\n", msg.toStdString()); } #endif diff --git a/src/qt/lux.qrc b/src/qt/lux.qrc index 4cfb707f..5c3faba7 100755 --- a/src/qt/lux.qrc +++ b/src/qt/lux.qrc @@ -49,7 +49,6 @@ res/icons/smartcontract.png res/icons/lsrtoken.png res/icons/masternodes.png - res/icons/trade.png res/icons/export.png res/icons/synced.png res/icons/remove.png diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp index 7be65113..1b2cdeaf 100755 --- a/src/qt/overviewpage.cpp +++ b/src/qt/overviewpage.cpp @@ -383,7 +383,6 @@ void OverviewPage::setWalletModel(WalletModel* model) connect(model, SIGNAL(balanceChanged(CAmount, CAmount, CAmount, CAmount, CAmount, CAmount, CAmount)), this, SLOT(setBalance(CAmount, CAmount, CAmount, CAmount, CAmount, CAmount, CAmount))); connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit())); - connect(model->getOptionsModel(), SIGNAL(darksendRoundsChanged()), this, SLOT(updateDarkSendProgress())); connect(model->getOptionsModel(), SIGNAL(advancedUIChanged(bool)), this, SLOT(updateAdvancedUI(bool))); updateAdvancedUI(model->getOptionsModel()->getShowAdvancedUI()); @@ -449,10 +448,30 @@ void OverviewPage::on_buttonAddToken_clicked() void OverviewPage::updateDarkSendProgress() { if (!pwalletMain) return; + if (IsInitialBlockDownload()) { + float progress = 0.0; + ui->darksendProgress->setValue(progress); + QString strToolPip = ("" + tr("Currently syncing") + ""); + ui->darksendProgress->setToolTip(strToolPip); + return; // don't update the darksend progress while syncing - there's no point! + } QString strAmountAndRounds; QString strAnonymizeLuxAmount = BitcoinUnits::formatHtmlWithUnit(nDisplayUnit, nAnonymizeLuxAmount * COIN, false, BitcoinUnits::separatorAlways); + if (!fEnableDarksend) { + ui->darksendProgress->setValue(0); + ui->darksendProgress->setToolTip(tr("Darksend disabled")); + + // when balance is zero just show info from settings + strAnonymizeLuxAmount = strAnonymizeLuxAmount.remove(strAnonymizeLuxAmount.indexOf("."), BitcoinUnits::decimals(nDisplayUnit) + 1); + strAmountAndRounds = strAnonymizeLuxAmount + " / " + tr("%n Rounds", "", nDarksendRounds); + + ui->labelAmountRounds->setToolTip(tr("Darksend disabled")); + ui->labelAmountRounds->setText(tr("Disabled")); + return; + } + if (currentBalance == 0) { ui->darksendProgress->setValue(0); ui->darksendProgress->setToolTip(tr("No inputs detected")); @@ -572,6 +591,7 @@ void OverviewPage::updateAdvancedUI(bool fShowAdvancedPSUI) { void OverviewPage::darkSendStatus() { + //bool fIsInitialBlockDownload = IsInitialBlockDownload(); static int64_t nLastDSProgressBlockTime = 0; int nBestHeight = chainActive.Height(); diff --git a/src/qt/res/icons/trade.png b/src/qt/res/icons/trade.png deleted file mode 100644 index fa872a61..00000000 Binary files a/src/qt/res/icons/trade.png and /dev/null differ diff --git a/src/qt/sendtocontract.cpp b/src/qt/sendtocontract.cpp index 2b6845f3..874a2f99 100644 --- a/src/qt/sendtocontract.cpp +++ b/src/qt/sendtocontract.cpp @@ -168,8 +168,8 @@ void SendToContract::setClientModel(ClientModel *_clientModel) if (m_clientModel) { - connect(m_clientModel, SIGNAL(numBlocksChanged()), this, SLOT(on_numBlocksChanged())); - on_numBlocksChanged(); + connect(m_clientModel, SIGNAL(numBlocksChanged(int)), this, SLOT(on_numBlocksChanged(int))); + on_numBlocksChanged(1); } } @@ -244,21 +244,28 @@ void SendToContract::on_sendToContractClicked() } } -void SendToContract::on_numBlocksChanged() +void SendToContract::on_numBlocksChanged(int newHeight) { if(m_clientModel) { - uint64_t blockGasLimit = 0; - uint64_t minGasPrice = 0; - uint64_t nGasPrice = 0; - m_clientModel->getGasInfo(blockGasLimit, minGasPrice, nGasPrice); - ui->labelGasLimit->setToolTip(tr("Gas limit: Default = %1, Max = %2.").arg(DEFAULT_GAS_LIMIT_OP_SEND).arg(blockGasLimit)); - ui->labelGasPrice->setToolTip(tr("Gas price: LUX price per gas unit. Default = %1, Min = %2.").arg(QString::fromStdString(FormatMoney(DEFAULT_GAS_PRICE))).arg(QString::fromStdString(FormatMoney(minGasPrice)))); - ui->lineEditGasPrice->setMinimum(minGasPrice); - ui->lineEditGasLimit->setMaximum(blockGasLimit); - - ui->lineEditSenderAddress->on_refresh(); + if (lastUpdatedHeight < newHeight) { + uint64_t blockGasLimit = 0; + uint64_t minGasPrice = 0; + uint64_t nGasPrice = 0; + m_clientModel->getGasInfo(blockGasLimit, minGasPrice, nGasPrice); + + ui->labelGasLimit->setToolTip( + tr("Gas limit: Default = %1, Max = %2.").arg(DEFAULT_GAS_LIMIT_OP_SEND).arg(blockGasLimit)); + ui->labelGasPrice->setToolTip(tr("Gas price: LUX price per gas unit. Default = %1, Min = %2.").arg( + QString::fromStdString(FormatMoney(DEFAULT_GAS_PRICE))).arg( + QString::fromStdString(FormatMoney(minGasPrice)))); + ui->lineEditGasPrice->setMinimum(minGasPrice); + ui->lineEditGasLimit->setMaximum(blockGasLimit); + + ui->lineEditSenderAddress->on_refresh(); + lastUpdatedHeight = newHeight; + } } } diff --git a/src/qt/sendtocontract.h b/src/qt/sendtocontract.h index 8499395d..fa32a003 100644 --- a/src/qt/sendtocontract.h +++ b/src/qt/sendtocontract.h @@ -36,7 +36,7 @@ class SendToContract : public QWidget public Q_SLOTS: void on_clearAllClicked(); void on_sendToContractClicked(); - void on_numBlocksChanged(); + void on_numBlocksChanged(int newHeight); void on_updateSendToContractButton(); void on_newContractABI(); void on_functionChanged(); @@ -59,6 +59,7 @@ public Q_SLOTS: ContractABI* m_contractABI; TabBarInfo* m_tabInfo; int m_results; + int lastUpdatedHeight; }; #endif // SENDTOCONTRACT_H diff --git a/src/qt/sendtokenpage.cpp b/src/qt/sendtokenpage.cpp index 980fb429..561d4069 100755 --- a/src/qt/sendtokenpage.cpp +++ b/src/qt/sendtokenpage.cpp @@ -80,8 +80,8 @@ void SendTokenPage::setClientModel(ClientModel *_clientModel) if (m_clientModel) { - connect(m_clientModel, SIGNAL(numBlocksChanged()), this, SLOT(on_numBlocksChanged())); - on_numBlocksChanged(); + connect(m_clientModel, SIGNAL(numBlocksChanged(int)), this, SLOT(on_numBlocksChanged(int))); + on_numBlocksChanged(1); } } @@ -121,19 +121,25 @@ void SendTokenPage::on_clearButton_clicked() clearAll(); } -void SendTokenPage::on_numBlocksChanged() +void SendTokenPage::on_numBlocksChanged(int newHeight) { if(m_clientModel) { - uint64_t blockGasLimit = 0; - uint64_t minGasPrice = 0; - uint64_t nGasPrice = 0; - m_clientModel->getGasInfo(blockGasLimit, minGasPrice, nGasPrice); - - ui->labelGasLimit->setToolTip(tr("Gas limit: Default = %1, Max = %2.").arg(DEFAULT_GAS_LIMIT_OP_SEND).arg(blockGasLimit)); - ui->labelGasPrice->setToolTip(tr("Gas price: LUX/gas unit. Default = %1, Min = %2.").arg(QString::fromStdString(FormatMoney(DEFAULT_GAS_PRICE))).arg(QString::fromStdString(FormatMoney(minGasPrice)))); - ui->lineEditGasPrice->setMinimum(minGasPrice); - ui->lineEditGasLimit->setMaximum(blockGasLimit); + if (lastUpdatedHeight < newHeight) { + uint64_t blockGasLimit = 0; + uint64_t minGasPrice = 0; + uint64_t nGasPrice = 0; + m_clientModel->getGasInfo(blockGasLimit, minGasPrice, nGasPrice); + + ui->labelGasLimit->setToolTip( + tr("Gas limit: Default = %1, Max = %2.").arg(DEFAULT_GAS_LIMIT_OP_SEND).arg(blockGasLimit)); + ui->labelGasPrice->setToolTip(tr("Gas price: LUX/gas unit. Default = %1, Min = %2.").arg( + QString::fromStdString(FormatMoney(DEFAULT_GAS_PRICE))).arg( + QString::fromStdString(FormatMoney(minGasPrice)))); + ui->lineEditGasPrice->setMinimum(minGasPrice); + ui->lineEditGasLimit->setMaximum(blockGasLimit); + lastUpdatedHeight = newHeight; + } } } diff --git a/src/qt/sendtokenpage.h b/src/qt/sendtokenpage.h index e591ed3d..e81bd5bd 100755 --- a/src/qt/sendtokenpage.h +++ b/src/qt/sendtokenpage.h @@ -31,7 +31,7 @@ class SendTokenPage : public QWidget private Q_SLOTS: void on_clearButton_clicked(); - void on_numBlocksChanged(); + void on_numBlocksChanged(int newHeight); void on_updateConfirmButton(); void on_confirmClicked(); @@ -41,6 +41,7 @@ private Q_SLOTS: ClientModel* m_clientModel; Token *m_tokenABI; SelectedToken *m_selectedToken; + int lastUpdatedHeight; }; #endif // SENDTOKENPAGE_H diff --git a/src/qt/smartcontractpage.cpp b/src/qt/smartcontractpage.cpp index fca8cce5..a0937287 100644 --- a/src/qt/smartcontractpage.cpp +++ b/src/qt/smartcontractpage.cpp @@ -301,13 +301,28 @@ void SmartContractPage::showOutOfSyncWarning(bool fShow) void SmartContractPage::updateDarkSendProgress() { if (!pwalletMain) return; + if (IsInitialBlockDownload()) { + float progress = 0.0; + ui->darksendProgress->setValue(progress); + QString strToolPip = ("" + tr("Currently syncing") + ""); + ui->darksendProgress->setToolTip(strToolPip); + return; // don't update the darksend progress while syncing - there's no point! + } QString strAmountAndRounds; QString strAnonymizeLuxAmount = BitcoinUnits::formatHtmlWithUnit(nDisplayUnit, nAnonymizeLuxAmount * COIN, false, BitcoinUnits::separatorAlways); + if (!fEnableDarksend) { + ui->darksendProgress->setValue(0); + ui->darksendProgress->setToolTip(tr("Darksend disabled")); + ui->labelAmountRounds->setToolTip(tr("Darksend disabled")); + ui->labelAmountRounds->setText(tr("Disabled")); + return; + } + if (currentBalance == 0) { - ui->darksendProgress>setValue(0); - ui->darksendProgress>setToolTip(tr("No inputs detected")); + ui->darksendProgress->setValue(0); + ui->darksendProgress->setToolTip(tr("No inputs detected")); // when balance is zero just show info from settings strAnonymizeLuxAmount = strAnonymizeLuxAmount.remove(strAnonymizeLuxAmount.indexOf("."), BitcoinUnits::decimals(nDisplayUnit) + 1); @@ -405,7 +420,7 @@ void SmartContractPage::updateDarkSendProgress() .arg(anonNormPart) .arg(anonFullPart) .arg(nAverageAnonymizedRounds); - ui->darksendProgress>setToolTip(strToolPip); + ui->darksendProgress->setToolTip(strToolPip); } void SmartContractPage::darkSendStatus() diff --git a/src/qt/tokentransactiontablemodel.cpp b/src/qt/tokentransactiontablemodel.cpp index 5c32bf9d..2cb9dc40 100644 --- a/src/qt/tokentransactiontablemodel.cpp +++ b/src/qt/tokentransactiontablemodel.cpp @@ -723,7 +723,7 @@ static void NotifyTokenTransactionChanged(TokenTransactionTableModel *ttm, CWall static void ShowProgress(TokenTransactionTableModel *ttm, const std::string &title, int nProgress) { - if (nProgress == 0) + if (nProgress < 100) fQueueNotifications = true; if (nProgress == 100) diff --git a/src/qt/tradingdialog.cpp b/src/qt/tradingdialog.cpp deleted file mode 100644 index c94dcf84..00000000 --- a/src/qt/tradingdialog.cpp +++ /dev/null @@ -1,1952 +0,0 @@ -// -// Created by 216k155 on 12/26/17. -// - -#include "tradingdialog.h" -#include "ui_tradingdialog.h" -#include "clientmodel.h" -#include "walletmodel.h" -#include -#include -#include -#include "crypto/rfc6979_hmac_sha256.h" -#include "utilstrencodings.h" -#include "qcustomplot.h" - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include "util.h" -#include - - -#include -#include - -#include -#include -#include - -#include -#include -#include - -using namespace std; - -tradingDialog::tradingDialog(QWidget *parent) : - QWidget(parent), - ui(new Ui::tradingDialog), - model(0) -{ - qmanager = new QNetworkAccessManager(this); - ui->setupUi(this); - timerid = 0; - qDebug() << "Expected this"; - - - QVBoxLayout* plotLay = new QVBoxLayout(); - ui->priceChart->setLayout(plotLay); - - derPlot = new QCustomPlot(); - plotLay->addWidget(derPlot); - - ohlc = new QCPFinancial(derPlot->xAxis, derPlot->yAxis); - ohlc->setName("OHLC"); - ohlc->setChartStyle(QCPFinancial::csOhlc); - - ui->BtcAvailableLabel->setTextFormat(Qt::RichText); - ui->LUXAvailableLabel->setTextFormat(Qt::RichText); - ui->BuyCostLabel->setTextFormat(Qt::RichText); - ui->SellCostLabel->setTextFormat(Qt::RichText); - ui->CryptopiaBTCLabel->setTextFormat(Qt::RichText); - ui->CryptopiaLUXLabel->setTextFormat(Qt::RichText); - ui->CSDumpLabel->setTextFormat(Qt::RichText); - ui->CSTotalLabel->setTextFormat(Qt::RichText); - ui->CSReceiveLabel->setTextFormat(Qt::RichText); - - //Set tabs to inactive - ui->TradingTabWidget->setTabEnabled(0,false); - ui->TradingTabWidget->setTabEnabled(1,false); - ui->TradingTabWidget->setTabEnabled(3,false); - ui->TradingTabWidget->setTabEnabled(4,false); - ui->TradingTabWidget->setTabEnabled(5,false); - -// connect(ui->TradingTabWidget, SIGNAL(tabBarClicked(int)), this, SLOT(on_TradingTabWidget_tabBarClicked(int))); - - // Listen for keypress - connect(ui->PasswordInput, SIGNAL(returnPressed()),ui->LoadKeys,SIGNAL(clicked())); - - /*OrderBook Table Init*/ - CreateOrderBookTables(*ui->BidsTable,QStringList() << tr("SUM(BTC)") << tr("TOTAL(BTC)") << tr("LUX(SIZE)") << tr("BID(BTC)")); - CreateOrderBookTables(*ui->AsksTable,QStringList() << tr("ASK(BTC)") << tr("LUX(SIZE)") << tr("TOTAL(BTC)") << tr("SUM(BTC)")); - connect (ui->BidsTable, SIGNAL(cellClicked(int,int)), this, SLOT(BidInfoInsertSlot(int, int))); - connect (ui->AsksTable, SIGNAL(cellClicked(int,int)), this, SLOT(AskInfoInsertSlot(int, int))); - /*OrderBook Table Init*/ - - /*Market History Table Init*/ - ui->MarketHistoryTable->setColumnCount(5); - ui->MarketHistoryTable->verticalHeader()->setVisible(false); - ui->MarketHistoryTable->setHorizontalHeaderLabels(QStringList() - << tr("DATE") << tr("BUY/SELL") << tr("BID/ASK") << tr("TOTAL UNITS(LUX)") << tr("TOTAL COST(BTC)")); - ui->MarketHistoryTable->setRowCount(0); - int Cellwidth = ui->MarketHistoryTable->width() / 5; - ui->MarketHistoryTable->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch); - ui->MarketHistoryTable->horizontalHeader()->resizeSection(1,Cellwidth); - ui->MarketHistoryTable->horizontalHeader()->resizeSection(2,Cellwidth); - ui->MarketHistoryTable->horizontalHeader()->resizeSection(3,Cellwidth); - ui->MarketHistoryTable->horizontalHeader()->resizeSection(4,Cellwidth); - ui->MarketHistoryTable->horizontalHeader()->resizeSection(5,Cellwidth); - ui->MarketHistoryTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft); - ui->MarketHistoryTable->horizontalHeader()->setStyleSheet("QHeaderView::section, QHeaderView::section * {font-weight :bold;}"); - /*Market History Table Init*/ - - /*Account History Table Init*/ - ui->TradeHistoryTable->setColumnCount(6); - ui->TradeHistoryTable->verticalHeader()->setVisible(false); - ui->TradeHistoryTable->setHorizontalHeaderLabels(QStringList() - << tr("Date Time") << tr("Exchange") << tr("OrderType") << tr("QTY") << tr("Price") << tr("PricePerUnit")); - ui->TradeHistoryTable->setRowCount(0); - Cellwidth = ui->TradeHistoryTable->width() / 6; - ui->TradeHistoryTable->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch); - ui->TradeHistoryTable->horizontalHeader()->resizeSection(1,Cellwidth); - ui->TradeHistoryTable->horizontalHeader()->resizeSection(2,Cellwidth); - ui->TradeHistoryTable->horizontalHeader()->resizeSection(3,Cellwidth); - ui->TradeHistoryTable->horizontalHeader()->resizeSection(4,Cellwidth); - ui->TradeHistoryTable->horizontalHeader()->resizeSection(5,Cellwidth); - ui->TradeHistoryTable->horizontalHeader()->resizeSection(6,Cellwidth); - /*ui->TradeHistoryTable->horizontalHeader()->resizeSection(7,Cellwidth); - ui->TradeHistoryTable->horizontalHeader()->resizeSection(8,Cellwidth); - ui->TradeHistoryTable->horizontalHeader()->resizeSection(9,Cellwidth);*/ - ui->TradeHistoryTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft); - ui->TradeHistoryTable->horizontalHeader()->setStyleSheet("QHeaderView::section, QHeaderView::section * {font-weight :bold;}"); - /*Account History Table Init*/ - - /*Open Orders Table*/ - ui->OpenOrdersTable->setColumnCount(9); - ui->OpenOrdersTable->verticalHeader()->setVisible(false); - ui->OpenOrdersTable->setHorizontalHeaderLabels(QStringList() - << tr("OrderId") << tr("Date Time") << tr("Exchange") << tr("OrderType") << tr("QTY") << tr("QTY_Rem") - << tr("Price") << tr("PricePerUnit") << tr("Cancel Order")); - ui->OpenOrdersTable->setRowCount(0); - Cellwidth = ui->OpenOrdersTable->width() / 8; - ui->OpenOrdersTable->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch); - ui->OpenOrdersTable->horizontalHeader()->resizeSection(2,Cellwidth); - ui->OpenOrdersTable->horizontalHeader()->resizeSection(3,Cellwidth); - ui->OpenOrdersTable->horizontalHeader()->resizeSection(4,Cellwidth); - ui->OpenOrdersTable->horizontalHeader()->resizeSection(5,Cellwidth); - ui->OpenOrdersTable->horizontalHeader()->resizeSection(6,Cellwidth); - ui->OpenOrdersTable->horizontalHeader()->resizeSection(7,Cellwidth); - ui->OpenOrdersTable->horizontalHeader()->resizeSection(8,Cellwidth); - //ui->OpenOrdersTable->horizontalHeader()->resizeSection(9,Cellwidth); - ui->OpenOrdersTable->setColumnHidden(0,false); - ui->OpenOrdersTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft); - ui->OpenOrdersTable->horizontalHeader()->setStyleSheet("QHeaderView::section, QHeaderView::section * {font-weight :bold;}"); - - connect (ui->OpenOrdersTable, SIGNAL(cellClicked(int,int)), this, SLOT(CancelOrderSlot(int, int))); - /*Open Orders Table*/ - InitTrading(); - -} - -void tradingDialog::InitTrading() -{ //todo - add internet connection/socket error checking. - - //Get default exchange info for the qlabels - UpdaterFunction(); - qDebug() << "Updater called"; - if(this->timerid == 0) - { - //Timer is not set,lets create one. - this->timer = new QTimer(this); - connect(timer, SIGNAL(timeout()), this, SLOT(UpdaterFunction())); - this->timer->start(5000); - this->timerid = this->timer->timerId(); - } - -} - -void tradingDialog::UpdaterFunction(){ - //LUXst get the main exchange info in order to populate qLabels in maindialog. then get data - //required for the current tab. - - int Retval = SetExchangeInfoTextLabels(); - - if (Retval == 0){ - ActionsOnSwitch(-1); - } -} - -QString tradingDialog::GetMarketSummary(){ - - QString Response = sendRequest("https://www.cryptopia.co.nz/api/GetMarket/LUX_BTC"); - return Response; -} - -QString tradingDialog::GetOrderBook(){ - - QString Response = sendRequest("https://www.cryptopia.co.nz/api/GetMarketOrders/LUX_BTC"); - return Response; -} - -void tradingDialog::GetMarketHistory(){ - std::function f = std::bind(&tradingDialog::showMarketHistoryWhenReplyFinished, this);//&tradingDialog::showMarketHistoryWhenReplyFinished;//std::bind(&tradingDialog::showMarketHistoryWhenReplyFinished, this); - - sendRequest1(QString("https://www.cryptopia.co.nz/api/GetMarketHistory/LUX_BTC"), f); -} - -QString tradingDialog::CancelOrder(QString OrderId){ - - QString URL = "https://www.cryptopia.co.nz/api/CancelTrade"; - - QString Response = sendRequest(URL, "POST", QString("{\"Type\":\"trade\", \"OrderId\":") + OrderId + QString("}")); - return Response; -} - -QString tradingDialog::BuyLUX(QString OrderType, double Quantity, double Rate){ - - QString str = ""; - QString URL = "https://www.cryptopia.co.nz/api/SubmitTrade"; - - QJsonObject stats_obj; - stats_obj["Market"] = "LUX/BTC"; - stats_obj["Type"] = "Buy"; - stats_obj["Amount"] = Quantity; - stats_obj["Rate"] = Rate; - - QJsonDocument doc(stats_obj); - QString param_str(doc.toJson(QJsonDocument::Compact)); - - - QString Response = sendRequest(URL, "POST", param_str); - return Response; -} - -QString tradingDialog::SellLUX(QString OrderType, double Quantity, double Rate){ - - QString str = ""; - QString URL = "https://www.cryptopia.co.nz/api/SubmitTrade"; - - QJsonObject stats_obj; - stats_obj["Market"] = "LUX/BTC"; - stats_obj["Type"] = "Sell"; - stats_obj["Amount"] = Quantity; - stats_obj["Rate"] = Rate; - - QJsonDocument doc(stats_obj); - QString param_str(doc.toJson(QJsonDocument::Compact)); - - - QString Response = sendRequest(URL, "POST", param_str); - return Response; -} - -QString tradingDialog::Withdraw(double Amount, QString Address, QString Coin){ - - QString str = ""; - QString URL = "https://www.cryptopia.co.nz/api/SubmitWithdraw"; - - char tmp_nonce[255]; - timeval curTime; - gettimeofday(&curTime, NULL); - long nonce = curTime.tv_usec; - sprintf(tmp_nonce, "%ld", nonce); - - QJsonObject stats_obj; - stats_obj["Currency"] = Coin; - stats_obj["Address"] = Address; - stats_obj["PaymentId"] = QString(tmp_nonce); - stats_obj["Amount"] = Amount; - - QJsonDocument doc(stats_obj); - QString param_str(doc.toJson(QJsonDocument::Compact)); - - QString Response = sendRequest(URL, "POST", param_str); - return Response; -} - -QString tradingDialog::GetOpenOrders(){ - QString URL = "https://www.cryptopia.co.nz/api/GetOpenOrders"; - - QString Response = sendRequest(URL, "POST"); - - return Response; -} - -QString tradingDialog::GetBalance(QString Currency){ - - QString URL = "https://www.cryptopia.co.nz/api/GetBalance"; - - QString Response = sendRequest(URL, "POST", QString("{\"Currency\":\"") + Currency + QString("\"}")); - return Response; -} - -QString tradingDialog::GetDepositAddress(){ - - QString URL = "https://www.cryptopia.co.nz/api/GetDepositAddress"; - QString Response = sendRequest(URL, "POST", QString("{\"Currency\":\"LUX\"}")); - return Response; -} - -QString tradingDialog::GetAccountHistory(){ - - QString URL = "https://www.cryptopia.co.nz/api/GetTradeHistory"; - - QString Response = sendRequest(URL, "POST"); - return Response; -} - -int tradingDialog::SetExchangeInfoTextLabels(){ - //Get the current exchange information + information for the current open tab if required. - QString str = ""; - QString Response = GetMarketSummary(); - - //Set the labels, parse the json result to get values. - QJsonObject obj = GetResultObjectFromJSONObject(Response); - - //set labels to richtext to use css. - ui->Bid->setTextFormat(Qt::RichText); - ui->Ask->setTextFormat(Qt::RichText); - ui->volumet->setTextFormat(Qt::RichText); - ui->volumebtc->setTextFormat(Qt::RichText); - - ui->Ask->setText(""+tr("Ask:")+" " + str.number(obj["AskPrice"].toDouble(),'i',8) + " BTC"); - - ui->Bid->setText(""+tr("Bid:")+" " + str.number(obj["BidPrice"].toDouble(),'i',8) + " BTC"); - - ui->volumet->setText(""+tr("LUX Volume:")+" " + str.number(obj["Volume"].toDouble(),'i',8) + " LUX"); - - ui->volumebtc->setText(""+tr("BTC Volume:")+" " + str.number(obj["BaseVolume"].toDouble(),'i',8) + " BTC"); - - obj.empty(); - - return 0; -} - -void tradingDialog::CreateOrderBookTables(QTableWidget& Table,QStringList TableHeader){ - - Table.setColumnCount(4); - Table.verticalHeader()->setVisible(false); - - Table.setHorizontalHeaderLabels(TableHeader); - - int Cellwidth = Table.width() / 4; - - Table.horizontalHeader()->resizeSection(1,Cellwidth); // column 1, width 50 - Table.horizontalHeader()->resizeSection(2,Cellwidth); - Table.horizontalHeader()->resizeSection(3,Cellwidth); - Table.horizontalHeader()->resizeSection(4,Cellwidth); - - Table.setRowCount(0); - - Table.horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch); - Table.horizontalHeader()->setDefaultAlignment(Qt::AlignLeft); - Table.horizontalHeader()->setStyleSheet("QHeaderView::section, QHeaderView::section * { font-weight :bold;}"); -} - -void tradingDialog::DisplayBalance(QLabel &BalanceLabel,QLabel &Available, QLabel &Pending, QString Currency,QString Response){ - - QString str; - - BalanceLabel.setTextFormat(Qt::RichText); - Available.setTextFormat(Qt::RichText); - Pending.setTextFormat(Qt::RichText); - - //Set the labels, parse the json result to get values. - QJsonObject ResultObject = GetResultObjectFromJSONArray(Response);//GetResultObjectFromJSONObject(Response); - - BalanceLabel.setText("" + str.number( ResultObject["Total"].toDouble(),'i',8) + " " + Currency); - Available.setText("" + str.number( ResultObject["Available"].toDouble(),'i',8) + " " +Currency); - Pending.setText("" + str.number( ResultObject["Unconfirmed"].toDouble(),'i',8) + " " +Currency); -} - -void tradingDialog::DisplayBalance(QLabel &BalanceLabel, QString Response){ - - QString str; - - //Set the labels, parse the json result to get values. - QJsonObject ResultObject = GetResultObjectFromJSONArray(Response); - BalanceLabel.setStyleSheet("font-weight:bold; font-size:12px; color:green"); - BalanceLabel.setText(str.number(ResultObject["Available"].toDouble(),'i',8)); -} - -void tradingDialog::DisplayBalance(QLabel &BalanceLabel, QLabel &BalanceLabel2, QString Response, QString Response2){ - - QString str; - QString str2; - - //Set the labels, parse the json result to get values. - QJsonObject ResultObject = GetResultObjectFromJSONArray(Response); - QJsonObject ResultObject2 = GetResultObjectFromJSONArray(Response2); - - BalanceLabel.setStyleSheet("font-weight:bold; font-size:12px; color:green"); - BalanceLabel2.setStyleSheet("font-weight:bold; font-size:12px; color:green"); - - BalanceLabel.setText(str.number(ResultObject["Available"].toDouble(),'i',8)); - BalanceLabel2.setText(str2.number(ResultObject2["Available"].toDouble(),'i',8)); -} - -void tradingDialog::ParseAndPopulateOpenOrdersTable(QString Response){ - - int itteration = 0, RowCount = 0; - - QJsonArray jsonArray = GetResultArrayFromJSONObject(Response); - QJsonObject obj; - - ui->OpenOrdersTable->setRowCount(0); - - Q_FOREACH (const QJsonValue & value, jsonArray) - { - QString str = ""; - obj = value.toObject(); - - RowCount = ui->OpenOrdersTable->rowCount(); - - ui->OpenOrdersTable->insertRow(RowCount); - ui->OpenOrdersTable->setItem(itteration, 0, new QTableWidgetItem(str.number(obj["OrderId"].toDouble(),'i',0))); - ui->OpenOrdersTable->setItem(itteration, 1, new QTableWidgetItem(CryptopiaTimeStampToReadable(obj["TimeStamp"].toString()))); - ui->OpenOrdersTable->setItem(itteration, 2, new QTableWidgetItem(obj["Market"].toString())); - ui->OpenOrdersTable->setItem(itteration, 3, new QTableWidgetItem(obj["Type"].toString())); - ui->OpenOrdersTable->setItem(itteration, 4, new QTableWidgetItem(str.number(obj["Amount"].toDouble(),'i',8))); - ui->OpenOrdersTable->setItem(itteration, 5, new QTableWidgetItem(str.number(obj["Remaining"].toDouble(),'i',8))); - ui->OpenOrdersTable->setItem(itteration, 6, new QTableWidgetItem(str.number(obj["Total"].toDouble(),'i',8))); - ui->OpenOrdersTable->setItem(itteration, 7, new QTableWidgetItem(str.number(obj["Rate"].toDouble(),'i',8))); - ui->OpenOrdersTable->setItem(itteration, 8, new QTableWidgetItem(tr("Cancel Order"))); - - //Handle the cancel link in open orders table - QTableWidgetItem* CancelCell; - CancelCell= ui->OpenOrdersTable->item(itteration, 8); //Set the wtablewidget item to the cancel cell item. - CancelCell->setForeground(QColor::fromRgb(255,0,0)); //make this item red. - CancelCell->setTextAlignment(Qt::AlignCenter); - itteration++; - } - obj.empty(); -} - -void tradingDialog::BidInfoInsertSlot(int row, int col){ - - QString BuyBidPriceString = ui->BidsTable->model()->data(ui->BidsTable->model()->index(row,3)).toString(); - QString UnitsString = ui->BidsTable->model()->data(ui->BidsTable->model()->index(row,2)).toString(); - ui->BuyBidPriceEdit->setText(BuyBidPriceString); - ui->UnitsInput->setText(UnitsString); - - - -} - -void tradingDialog::AskInfoInsertSlot(int row, int col){ - - QString SellBidPriceString = ui->AsksTable->model()->data(ui->AsksTable->model()->index(row,0)).toString(); - QString UnitsLUXString = ui->AsksTable->model()->data(ui->AsksTable->model()->index(row,1)).toString(); - ui->SellBidPriceEdit->setText(SellBidPriceString); - ui->UnitsInputLUX->setText(UnitsLUXString); - - - -} - -void tradingDialog::CancelOrderSlot(int row, int col){ - - QString OrderId = ui->OpenOrdersTable->model()->data(ui->OpenOrdersTable->model()->index(row,0)).toString(); - QMessageBox::StandardButton reply; - reply = QMessageBox::question(this,"Cancel Order","Are you sure you want to cancel the order?",QMessageBox::Yes|QMessageBox::No); - - if (reply == QMessageBox::Yes) { - - QString Response = CancelOrder(OrderId); - - QJsonDocument jsonResponse = QJsonDocument::fromJson(Response.toUtf8()); - QJsonObject ResponseObject = jsonResponse.object(); - - if (ResponseObject["Success"].toBool() == false){ - - QMessageBox::information(this,"Failed To Cancel Order",ResponseObject["Error"].toString()); - - }else if (ResponseObject["Success"].toBool() == true){ - ui->OpenOrdersTable->model()->removeRow(row); - QMessageBox::information(this,"Success","You're order was cancelled."); - } - } else { - qDebug() << "Do Nothing"; - } -} - -void tradingDialog::ParseAndPopulateAccountHistoryTable(QString Response){ - - int itteration = 0, RowCount = 0; - - QJsonArray jsonArray = GetResultArrayFromJSONObject(Response); - QJsonObject obj; - - ui->TradeHistoryTable->setRowCount(0); - - Q_FOREACH (const QJsonValue & value, jsonArray) - { - QString str = ""; - obj = value.toObject(); - - RowCount = ui->TradeHistoryTable->rowCount(); - - ui->TradeHistoryTable->insertRow(RowCount); - ui->TradeHistoryTable->setItem(itteration, 0, new QTableWidgetItem(CryptopiaTimeStampToReadable(obj["TimeStamp"].toString()))); - ui->TradeHistoryTable->setItem(itteration, 1, new QTableWidgetItem(obj["Market"].toString())); - ui->TradeHistoryTable->setItem(itteration, 2, new QTableWidgetItem(obj["Type"].toString())); - ui->TradeHistoryTable->setItem(itteration, 3, new QTableWidgetItem(str.number(obj["Amount"].toDouble(),'i',8))); - ui->TradeHistoryTable->setItem(itteration, 4, new QTableWidgetItem(str.number(obj["Total"].toDouble(),'i',8))); - ui->TradeHistoryTable->setItem(itteration, 5, new QTableWidgetItem(str.number(obj["Rate"].toDouble(),'i',8))); - itteration++; - } - - obj.empty(); -} - - -void tradingDialog::ParseAndPopulateOrderBookTables(QString OrderBook){ - - QString str; - QJsonObject obj; - QJsonObject ResultObject = GetResultObjectFromJSONObject(OrderBook); - - - int BuyItteration = 0,SellItteration = 0, BidRows = 0, AskRows = 0; - - QJsonArray BuyArray = ResultObject.value("Buy").toArray(); //get buy/sell object from result object - QJsonArray SellArray = ResultObject.value("Sell").toArray(); //get buy/sell object from result object - - double LUXSupply = 0; - double LUXDemand = 0; - double BtcSupply = 0; - double BtcDemand = 0; - - ui->AsksTable->setRowCount(0); - - Q_FOREACH (const QJsonValue & value, SellArray) - { - obj = value.toObject(); - - double x = obj["Price"].toDouble(); //would like to use int64 here - double y = obj["Volume"].toDouble(); - double a = (x * y); - - LUXSupply += y; - BtcSupply += a; - - AskRows = ui->AsksTable->rowCount(); - ui->AsksTable->insertRow(AskRows); - ui->AsksTable->setItem(SellItteration, 0, new QTableWidgetItem(str.number(x,'i',8))); - ui->AsksTable->setItem(SellItteration, 1, new QTableWidgetItem(str.number(y,'i',8))); - ui->AsksTable->setItem(SellItteration, 2, new QTableWidgetItem(str.number(a,'i',8))); - ui->AsksTable->setItem(SellItteration, 3, new QTableWidgetItem(str.number(BtcSupply,'i',8))); - SellItteration++; - } - - ui->BidsTable->setRowCount(0); - - Q_FOREACH (const QJsonValue & value, BuyArray) - { - obj = value.toObject(); - - double x = obj["Price"].toDouble(); //would like to use int64 here - double y = obj["Volume"].toDouble(); - double a = (x * y); - - LUXDemand += y; - BtcDemand += a; - - BidRows = ui->BidsTable->rowCount(); - ui->BidsTable->insertRow(BidRows); - ui->BidsTable->setItem(BuyItteration, 0, new QTableWidgetItem(str.number(BtcDemand,'i',8))); - ui->BidsTable->setItem(BuyItteration, 1, new QTableWidgetItem(str.number(a,'i',8))); - ui->BidsTable->setItem(BuyItteration, 2, new QTableWidgetItem(str.number(y,'i',8))); - ui->BidsTable->setItem(BuyItteration, 3, new QTableWidgetItem(str.number(x,'i',8))); - BuyItteration++; - } - - ui->LUXSupply->setText(""+tr("Supply:")+" " + str.number(LUXSupply,'i',8) + " LUX"); - ui->BtcSupply->setText("" + str.number(BtcSupply,'i',8) + " BTC"); - ui->AsksCount->setText(""+tr("Ask's:")+" " + str.number(ui->AsksTable->rowCount()) + ""); - - ui->LUXDemand->setText(""+tr("Demand:")+" " + str.number(LUXDemand,'i',8) + " LUX"); - ui->BtcDemand->setText("" + str.number(BtcDemand,'i',8) + " BTC"); - ui->BidsCount->setText(""+tr("Bid's:")+" " + str.number(ui->BidsTable->rowCount()) + ""); - obj.empty(); -} - - -void tradingDialog::ParseAndPopulateMarketHistoryTable(QString Response){ - - int itteration = 0, RowCount = 0; - QJsonArray jsonArray = GetResultArrayFromJSONObject(Response); - QJsonObject obj; - - ui->MarketHistoryTable->setRowCount(0); - - Q_FOREACH (const QJsonValue & value, jsonArray) - { - QString str = ""; - obj = value.toObject(); - RowCount = ui->MarketHistoryTable->rowCount(); - - ui->MarketHistoryTable->insertRow(RowCount); - ui->MarketHistoryTable->setItem(itteration, 0, new QTableWidgetItem(CryptopiaIntegerTimeStampToReadable(obj["Timestamp"].toInt()))); - ui->MarketHistoryTable->setItem(itteration, 1, new QTableWidgetItem(obj["Type"].toString())); - ui->MarketHistoryTable->setItem(itteration, 2, new QTableWidgetItem(str.number(obj["Price"].toDouble(),'i',8))); - ui->MarketHistoryTable->setItem(itteration, 3, new QTableWidgetItem(str.number(obj["Amount"].toDouble(),'i',8))); - ui->MarketHistoryTable->setItem(itteration, 4, new QTableWidgetItem(str.number(obj["Total"].toDouble(),'i',8))); - ui->MarketHistoryTable->item(itteration,1)->setBackgroundColor((obj["Type"] == QStringLiteral("Buy")) ? (QColor (150, 191, 70,255)) : ( QColor (201, 119, 153,255))); - itteration++; - } - obj.empty(); -} - - -void tradingDialog::ParseAndPopulatePriceChart(QString Response){ - - int itteration = 0; - QJsonArray jsonArray = GetResultArrayFromJSONObject(Response); - QJsonObject obj; - double binSize = 60*15; - - QVector time(jsonArray.size()), price(jsonArray.size()); - - Q_FOREACH (const QJsonValue & value, jsonArray) - { - QString str = ""; - obj = value.toObject(); - - - time[itteration] = obj["Timestamp"].toDouble(); - price[itteration] = obj["Price"].toDouble(); - - itteration++; - } - obj.empty(); - - - std::reverse(price.begin(), price.end()); - std::reverse(time.begin(), time.end()); - - double min_time = *std::min_element(time.constBegin(), time.constEnd()); - double max_time = *std::max_element(time.constBegin(), time.constEnd()); - - double min_price = *std::min_element(price.constBegin(), price.constEnd()); - double max_price = *std::max_element(price.constBegin(), price.constEnd()); - double diff_price = max_price - min_price; - - ohlc->data()->set(QCPFinancial::timeSeriesToOhlc(time, price, binSize/3.0, min_time)); // divide binSize by 3 just to make the ohlc bars a bit denser - ohlc->setWidth(binSize*0.2); - ohlc->setTwoColored(true); - - derPlot->xAxis->setLabel(tr("Time (GMT)")); - derPlot->yAxis->setLabel(tr("LUX Price in BTC")); - - QCPAxisRect *volumeAxisRect = new QCPAxisRect(derPlot); - QSharedPointer dateTimeTicker(new QCPAxisTickerDateTime); - dateTimeTicker->setDateTimeSpec(Qt::UTC); - dateTimeTicker->setDateTimeFormat("dd.MM.yy(hh:mm)"); - volumeAxisRect->axis(QCPAxis::atBottom)->setTicker(dateTimeTicker); - volumeAxisRect->axis(QCPAxis::atBottom)->setTickLabelRotation(15); - derPlot->xAxis->setBasePen(Qt::NoPen); - derPlot->xAxis->setTicker(dateTimeTicker); - derPlot->rescaleAxes(); - derPlot->xAxis->setRange(min_time, max_time+5); - derPlot->xAxis->scaleRange(1.025, derPlot->xAxis->range().center()); - derPlot->yAxis->setRange(min_price-0.2*diff_price, max_price+0.2*diff_price); - - derPlot->replot(); - - -} - -void tradingDialog::ActionsOnSwitch(int index = -1){ - - QString Response = ""; - QString Response2 = ""; - QString Response3 = ""; - QString Response4 = ""; - - if(index == -1){ - index = ui->TradingTabWidget->currentIndex(); - } - std::function f; - - switch (index){ - case 0: //buy tab is active - - f = std::bind(&tradingDialog::showBalanceOfLUXOnTradingTab, this); - sendRequest1(QString("https://www.cryptopia.co.nz/api/GetBalance"), f, "POST", QString("{\"Currency\":\"") + "LUX" + QString("\"}")); - - f = std::bind(&tradingDialog::showBalanceOfBTCOnTradingTab, this); - sendRequest1(QString("https://www.cryptopia.co.nz/api/GetBalance"), f, "POST", QString("{\"Currency\":\"") + "BTC" + QString("\"}")); - - f = std::bind(&tradingDialog::showOrderBookOnTradingTab, this); - sendRequest1("https://www.cryptopia.co.nz/api/GetMarketOrders/LUX_BTC", f); - - f = std::bind(&tradingDialog::showMarketHistoryOnTradingTab, this); - sendRequest1(QString("https://www.cryptopia.co.nz/api/GetMarketHistory/LUX_BTC"), f); - - break; - - case 1: //Cross send tab active - - f = std::bind(&tradingDialog::showBalanceOfLUXOnSendTab, this); - sendRequest1(QString("https://www.cryptopia.co.nz/api/GetBalance"), f, "POST", QString("{\"Currency\":\"") + "LUX" + QString("\"}")); - - f = std::bind(&tradingDialog::showBalanceOfBTCOnSendTab, this); - sendRequest1(QString("https://www.cryptopia.co.nz/api/GetBalance"), f, "POST", QString("{\"Currency\":\"") + "BTC" + QString("\"}")); - - break; - - case 2://market history tab - GetMarketHistory(); - break; - - case 3: //open orders tab - - f = std::bind(&tradingDialog::showOpenOrders, this); - sendRequest1("https://www.cryptopia.co.nz/api/GetOpenOrders", f, "POST"); - - break; - - case 4://account history tab - - f = std::bind(&tradingDialog::showAccountHistory, this); - sendRequest1("https://www.cryptopia.co.nz/api/GetTradeHistory", f, "POST"); - - break; - - case 5://show balance tab - - f = std::bind(&tradingDialog::showBalanceOfLUXOnBalanceTab, this); - sendRequest1(QString("https://www.cryptopia.co.nz/api/GetBalance"), f, "POST", QString("{\"Currency\":\"") + "LUX" + QString("\"}")); - - f = std::bind(&tradingDialog::showBalanceOfBTCOnBalanceTab, this); - sendRequest1(QString("https://www.cryptopia.co.nz/api/GetBalance"), f, "POST", QString("{\"Currency\":\"") + "BTC" + QString("\"}")); - - break; - - case 6: - - break; - - } - -} - -void tradingDialog::on_TradingTabWidget_tabBarClicked(int index) -{ - //tab was clicked, interrupt the timer and restart after action completed. - - this->timer->stop(); - - ActionsOnSwitch(index); - - this->timer->start(); -} - - -QString tradingDialog::sendRequest(QString url, QString method, QString body){ - - QString Response = ""; - QString Secret = this->SecretKey; - - string signature; - string hmacsignature; - string headerValue; - - // create custom temporary event loop on stack - QEventLoop eventLoop; - - // "quit()" the event-loop, when the network request "finished()" - QNetworkAccessManager mgr; - QObject::connect(&mgr, SIGNAL(finished(QNetworkReply*)), &eventLoop, SLOT(quit())); - - // the HTTP request - QNetworkRequest req = QNetworkRequest(QUrl(url)); - - req.setHeader(QNetworkRequest::ContentTypeHeader, "application/json"); - - QNetworkReply *reply = NULL; - if(method == "GET") { - reply = mgr.get(req); - } else if(method == "POST") { - - string API_KEY = this->ApiKey.toStdString(); - string SECRET_KEY = this->SecretKey.toStdString(); - - unsigned char digest[16]; - const char* string = body.toLatin1().data(); - - MD5_CTX ctx; - MD5_Init(&ctx); - MD5_Update(&ctx, string, strlen(string)); - MD5_Final(digest, &ctx); - - char mdString[33]; - for (int i = 0; i < 16; i++) - sprintf(&mdString[i*2], "%02x", (unsigned int)digest[i]); - - timeval curTime; - gettimeofday(&curTime, NULL); - long nonce = curTime.tv_usec; - - - char *requestContentBase64String = base64(digest, sizeof(digest)); - - - signature += API_KEY; - signature += "POST"; - signature += url_encode(url.toStdString()); - signature += to_string(nonce); - signature += requestContentBase64String; - - const unsigned char * hmacsignature = HMAC_SHA256_SIGNER(QString(signature.c_str()), QString(SECRET_KEY.c_str())); - - QString hmacsignature_base64 = base64(hmacsignature, 32); - - headerValue = "amx " + API_KEY + ":" + hmacsignature_base64.toStdString().c_str() + ":" + to_string(nonce); - - req.setRawHeader("Authorization", headerValue.data()); - req.setRawHeader("Content-Type", "application/json"); - - reply = mgr.post(req, body.toUtf8()); - } - - eventLoop.exec(); // blocks stack until "finished()" has been called - - if (!reply) - { - return "Error"; - } - - if (reply->error() == QNetworkReply::NoError) { - //success - Response = reply->readAll(); - - } - else{ - //failure - qDebug() << "Failure" <errorString(); - Response = "Error"; - } - reply->close(); - reply->deleteLater(); - - return Response; -} - -void tradingDialog::sendRequest1(QString url, std::function funcForCallAfterReceiveResponse, QString method, QString body){ - - QString Response = ""; - QString Secret = this->SecretKey; - - string signature; - string hmacsignature; - string headerValue; - - // the HTTP request - QNetworkRequest req = QNetworkRequest(QUrl(url)); - - req.setHeader(QNetworkRequest::ContentTypeHeader, "application/json"); - - QNetworkReply *reply = NULL; - //reply = qmanager->get(req); - - //printf("REPLY STARTED %s\n",url.toStdString().c_str()); - - //funcForCallAfterReceiveResponse(); - - - - if(method == "GET") { - reply = qmanager->get(req); - } else if(method == "POST") { - - string API_KEY = this->ApiKey.toStdString(); - string SECRET_KEY = this->SecretKey.toStdString(); - - unsigned char digest[16]; - const char* string = body.toLatin1().data(); - - MD5_CTX ctx; - MD5_Init(&ctx); - MD5_Update(&ctx, string, strlen(string)); - MD5_Final(digest, &ctx); - - char mdString[33]; - for (int i = 0; i < 16; i++) - sprintf(&mdString[i*2], "%02x", (unsigned int)digest[i]); - - timeval curTime; - gettimeofday(&curTime, NULL); - long nonce = curTime.tv_usec; - - char *requestContentBase64String = base64(digest, sizeof(digest)); - - signature += API_KEY; - signature += "POST"; - signature += url_encode(url.toStdString()); - signature += to_string(nonce); - signature += requestContentBase64String; - - const unsigned char * hmacsignature = HMAC_SHA256_SIGNER(QString(signature.c_str()), QString(SECRET_KEY.c_str())); - - QString hmacsignature_base64 = base64(hmacsignature, 32); - - headerValue = "amx " + API_KEY + ":" + hmacsignature_base64.toStdString().c_str() + ":" + to_string(nonce); - - req.setRawHeader("Authorization", headerValue.data()); - req.setRawHeader("Content-Type", "application/json"); - - reply = qmanager->post(req, body.toUtf8()); - } - - if (!reply) return; - - connect( reply, &QNetworkReply::finished, this, [reply, this, funcForCallAfterReceiveResponse](){ - funcForCallAfterReceiveResponse(); - }); - - -} - -void tradingDialog::slotReadyRead() { - printf("slotReadyRead\n"); -} - -void tradingDialog::slotError1(QNetworkReply::NetworkError e) { - printf("slotError\n"); -} - - -void tradingDialog::showMarketHistoryWhenReplyFinished() { - QNetworkReply *reply = qobject_cast(sender()); - QString Response = ""; - if (reply->error() == QNetworkReply::NoError) { - //success - Response = reply->readAll(); - - } - else{ - //failure - qDebug() << "Failure" << reply->errorString(); - Response = "Error"; - } - - reply->deleteLater(); - if(Response.size() > 0 && Response != "Error"){ - ParseAndPopulateMarketHistoryTable(Response); - } -} - -void tradingDialog::showBalanceOfLUXOnTradingTab() { - QNetworkReply *reply = qobject_cast(sender()); - QString Response = ""; - if (reply->error() == QNetworkReply::NoError) { - //success - Response = reply->readAll(); - - } - else{ - //failure - qDebug() << "Failure" << reply->errorString(); - Response = "Error"; - } - - reply->deleteLater(); - if(Response.size() > 0 && Response != "Error"){ - DisplayBalance(*ui->LUXAvailableLabel, Response); - } -} - -void tradingDialog::showBalanceOfBTCOnTradingTab() { - QNetworkReply *reply = qobject_cast(sender()); - QString Response = ""; - if (reply->error() == QNetworkReply::NoError) { - //success - Response = reply->readAll(); - - } - else{ - //failure - qDebug() << "Failure" << reply->errorString(); - Response = "Error"; - } - - reply->deleteLater(); - if(Response.size() > 0 && Response != "Error"){ - DisplayBalance(*ui->BtcAvailableLabel, Response); - } -} - -void tradingDialog::showOrderBookOnTradingTab() { - QNetworkReply *reply = qobject_cast(sender()); - QString Response = ""; - if (reply->error() == QNetworkReply::NoError) { - //success - Response = reply->readAll(); - - } - else{ - //failure - qDebug() << "Failure" << reply->errorString(); - Response = "Error"; - } - - reply->deleteLater(); - if(Response.size() > 0 && Response != "Error"){ - ParseAndPopulateOrderBookTables(Response); - } -} - -void tradingDialog::showMarketHistoryOnTradingTab() { - QNetworkReply *reply = qobject_cast(sender()); - QString Response = ""; - if (reply->error() == QNetworkReply::NoError) { - //success - Response = reply->readAll(); - - } - else{ - //failure - qDebug() << "Failure" << reply->errorString(); - Response = "Error"; - } - - reply->deleteLater(); - if(Response.size() > 0 && Response != "Error"){ - ParseAndPopulatePriceChart(Response); - } -} - -void tradingDialog::showBalanceOfLUXOnSendTab() { - QNetworkReply *reply = qobject_cast(sender()); - QString Response = ""; - if (reply->error() == QNetworkReply::NoError) { - //success - Response = reply->readAll(); - - } - else{ - //failure - qDebug() << "Failure" << reply->errorString(); - Response = "Error"; - } - - reply->deleteLater(); - if(Response.size() > 0 && Response != "Error"){ - DisplayBalance(*ui->CryptopiaLUXLabel, Response); - } -} - -void tradingDialog::showBalanceOfBTCOnSendTab() { - QNetworkReply *reply = qobject_cast(sender()); - QString Response = ""; - if (reply->error() == QNetworkReply::NoError) { - //success - Response = reply->readAll(); - - } - else{ - //failure - qDebug() << "Failure" << reply->errorString(); - Response = "Error"; - } - - reply->deleteLater(); - if(Response.size() > 0 && Response != "Error"){ - DisplayBalance(*ui->CryptopiaBTCLabel, Response); - } -} - -void tradingDialog::showBalanceOfLUXOnBalanceTab() { - QNetworkReply *reply = qobject_cast(sender()); - QString Response = ""; - if (reply->error() == QNetworkReply::NoError) { - //success - Response = reply->readAll(); - - } - else{ - //failure - qDebug() << "Failure" << reply->errorString(); - Response = "Error"; - } - - reply->deleteLater(); - if(Response.size() > 0 && Response != "Error"){ - DisplayBalance(*ui->LUXBalanceLabel,*ui->LUXAvailableLabel_2,*ui->LUXPendingLabel, QString::fromUtf8("LUX"),Response); - } -} - -void tradingDialog::showBalanceOfBTCOnBalanceTab() { - QNetworkReply *reply = qobject_cast(sender()); - QString Response = ""; - if (reply->error() == QNetworkReply::NoError) { - //success - Response = reply->readAll(); - - } - else{ - //failure - qDebug() << "Failure" << reply->errorString(); - Response = "Error"; - } - - reply->deleteLater(); - if(Response.size() > 0 && Response != "Error"){ - DisplayBalance(*ui->BitcoinBalanceLabel,*ui->BitcoinAvailableLabel,*ui->BitcoinPendingLabel, QString::fromUtf8("BTC"),Response); - } -} - -void tradingDialog::showOpenOrders() { - QNetworkReply *reply = qobject_cast(sender()); - QString Response = ""; - if (reply->error() == QNetworkReply::NoError) { - //success - Response = reply->readAll(); - - } - else{ - //failure - qDebug() << "Failure" << reply->errorString(); - Response = "Error"; - } - - reply->deleteLater(); - if(Response.size() > 0 && Response != "Error"){ - ParseAndPopulateOpenOrdersTable(Response); - } -} - -void tradingDialog::showAccountHistory() { - QNetworkReply *reply = qobject_cast(sender()); - QString Response = ""; - if (reply->error() == QNetworkReply::NoError) { - //success - Response = reply->readAll(); - - } - else{ - //failure - qDebug() << "Failure" << reply->errorString(); - Response = "Error"; - } - - reply->deleteLater(); - if(Response.size() > 0 && Response != "Error"){ - ParseAndPopulateAccountHistoryTable(Response); - } -} - -char * tradingDialog::base64(const unsigned char *input, int length) -{ - BIO *bmem, *b64; - BUF_MEM *bptr; - - b64 = BIO_new(BIO_f_base64()); - bmem = BIO_new(BIO_s_mem()); - b64 = BIO_push(b64, bmem); - BIO_write(b64, input, length); - (void)BIO_flush(b64); - BIO_get_mem_ptr(b64, &bptr); - - char *buff = (char *)malloc(bptr->length); - memcpy(buff, bptr->data, bptr->length-1); - buff[bptr->length-1] = 0; - - BIO_free_all(b64); - - return buff; -} - - -string tradingDialog::url_encode(const string &value) { - ostringstream escaped; - escaped.fill('0'); - escaped << hex; - - for (string::const_iterator i = value.begin(), n = value.end(); i != n; ++i) { - string::value_type c = (*i); - - // Keep alphanumeric and other accepted characters intact - if (isalnum(c) || c == '-' || c == '_' || c == '.' || c == '~') { - escaped << c; - continue; - } - - // Any other characters are percent-encoded - escaped << uppercase; - escaped << '%' << setw(2) << int((unsigned char) c); - escaped << nouppercase; - } - - string escaped_str = escaped.str(); - //std::transform(escaped_str.begin(), escaped_str.end(), escaped_str.begin(), tolower); - for(unsigned int i = 0; i < escaped_str.length(); ++i) { - escaped_str[i] = tolower(escaped_str[i]); - } - - return escaped_str; -} - - -QString tradingDialog::CryptopiaIntegerTimeStampToReadable(int DateTime){ - - QDateTime dt; - dt.setTime_t(DateTime); - - //Reconstruct time and date in our own format, one that QDateTime will recognise. - QString DisplayDate = dt.toString("yyyy-MM-dd HH:mm:ss"); - - return DisplayDate; -} - -QString tradingDialog::CryptopiaTimeStampToReadable(QString DateTime){ - // Seperate Time and date. "2016-02-01T16:18:44.839246" - int TPos = DateTime.indexOf("T"); - int sPos = DateTime.indexOf("."); - //bool ok = false; int msecs = DateTime.right(sPos).toInt(&ok, 10); - QDateTime Date = QDateTime::fromString(DateTime.left(TPos),"yyyy-MM-dd"); - DateTime.remove(sPos,sizeof(DateTime)); - DateTime.remove(0,TPos+1); - QDateTime Time = QDateTime::fromString(DateTime.right(TPos),"HH:mm:ss"); - - //Reconstruct time and date in our own format, one that QDateTime will recognise. - QString DisplayDate = Date.toString("yyyy-MM-dd") + " " + Time.toString("HH:mm:ss"); - - return DisplayDate; -} - -void tradingDialog::CalculateBuyCostLabel(){ - - double price = ui->BuyBidPriceEdit->text().toDouble(); - double Quantity = ui->UnitsInput->text().toDouble(); - double cost = ((price * Quantity) + ((price * Quantity / 100) * 0.25)); - - QString Str = ""; - ui->BuyCostLabel->setText("" + Str.number(cost,'i',8) + ""); -} - -void tradingDialog::CalculateSellCostLabel(){ - - double price = ui->SellBidPriceEdit->text().toDouble(); - double Quantity = ui->UnitsInputLUX->text().toDouble(); - double cost = ((price * Quantity) - ((price * Quantity / 100) * 0.25)); - - QString Str = ""; - ui->SellCostLabel->setText("" + Str.number(cost,'i',8) + ""); -} - -void tradingDialog::CalculateCSReceiveLabel(){ - - //calculate amount of currency than can be transferred to bitcoin - QString balance = GetBalance("LUX"); - QString buyorders = GetOrderBook(); - - QJsonObject BuyObject = GetResultObjectFromJSONObject(buyorders); - QJsonObject BalanceObject = GetResultObjectFromJSONArray(balance); - QJsonObject obj; - - QJsonDocument doc(BuyObject); - QString param_str1(doc.toJson(QJsonDocument::Compact)); - - QJsonDocument doc2(BalanceObject); - QString param_str2(doc2.toJson(QJsonDocument::Compact)); - - double AvailableLUX = BalanceObject["Available"].toDouble(); - double Quantity = ui->CSUnitsInput->text().toDouble(); - double Received = 0; - double Qty = 0; - double Price = 0; - QJsonArray BuyArray = BuyObject.value("Buy").toArray(); //get buy/sell object from result object - - // For each buy order - Q_FOREACH (const QJsonValue & value, BuyArray) - { - obj = value.toObject(); - - double x = obj["Price"].toDouble(); //would like to use int64 here - double y = obj["Volume"].toDouble(); - // If - if ( ((Quantity / x) - y) > 0 ) - { - Price = x; - Received += ((Price * y) - ((Price * y / 100) * 0.25)); - Qty += y; - Quantity -= ((Price * y) - ((Price * y / 100) * 0.25)); - } else { - Price = x; - Received += ((Price * (Quantity / x)) - ((Price * (Quantity / x) / 100) * 0.25)); - Qty += (Quantity / x); - Quantity -= 0; - break; - } - } - - - QString ReceiveStr = ""; - QString DumpStr = ""; - QString TotalStr = ""; - - if ( Qty < AvailableLUX ) - { - ui->CSReceiveLabel->setStyleSheet("font-weight:bold; font-size:12px; color:green"); - ui->CSDumpLabel->setStyleSheet("font-weight:bold; font-size:12px; color:red"); - ui->CSTotalLabel->setStyleSheet("font-weight:bold; font-size:12px; color:red"); - ui->CSReceiveLabel->setText(ReceiveStr.number((ui->CSUnitsInput->text().toDouble() - 0.0002),'i',8)); - ui->CSDumpLabel->setText(DumpStr.number(Price,'i',8)); - ui->CSTotalLabel->setText(TotalStr.number(Qty,'i',8)); - } else { - ReceiveStr = "N/A"; - TotalStr = "N/A"; - DumpStr = "N/A"; - ui->CSReceiveLabel->setStyleSheet("font-weight:bold; font-size:12px; color:red"); - ui->CSDumpLabel->setStyleSheet("font-weight:bold; font-size:12px; color:red"); - ui->CSTotalLabel->setStyleSheet("font-weight:bold; font-size:12px; color:red"); - ui->CSReceiveLabel->setText(ReceiveStr); - ui->CSDumpLabel->setText(DumpStr); - ui->CSTotalLabel->setText(TotalStr); - } -} - -void tradingDialog::on_UpdateKeys_clicked() -{ - this->ApiKey = ui->ApiKeyInput->text(); - this->SecretKey = ui->SecretKeyInput->text(); - - - QJsonDocument jsonResponse = QJsonDocument::fromJson(GetAccountHistory().toUtf8()); //get json from str. - QJsonObject ResponseObject = jsonResponse.object(); //get json obj - - if ( ResponseObject.value("Success").toBool() == false){ - QMessageBox::information(this,tr("API Configuration Failed"),tr("Api configuration was unsuccesful.")); - - }else if ( ResponseObject.value("Success").toBool() == true && Load){ - QMessageBox::information(this,tr("API Configuration Complete"),tr("Your API keys have been loaded and the connection has been successfully configured and tested.")); - ui->ApiKeyInput->setEchoMode(QLineEdit::Password); - ui->SecretKeyInput->setEchoMode(QLineEdit::Password); - ui->PasswordInput->setText(""); - ui->TradingTabWidget->setTabEnabled(0,true); - ui->TradingTabWidget->setTabEnabled(1,true); - ui->TradingTabWidget->setTabEnabled(3,true); - ui->TradingTabWidget->setTabEnabled(4,true); - ui->TradingTabWidget->setTabEnabled(5,true); - Load = false; - }else if ( ResponseObject.value("Success").toBool() == true && Save){ - QMessageBox::information(this,tr("API Configuration Complete"),tr("Your API keys have been saved and the connection has been successfully configured and tested.")); - ui->ApiKeyInput->setEchoMode(QLineEdit::Password); - ui->SecretKeyInput->setEchoMode(QLineEdit::Password); - ui->PasswordInput->setText(""); - ui->TradingTabWidget->setTabEnabled(0,true); - ui->TradingTabWidget->setTabEnabled(1,true); - ui->TradingTabWidget->setTabEnabled(3,true); - ui->TradingTabWidget->setTabEnabled(4,true); - ui->TradingTabWidget->setTabEnabled(5,true); - Save = false; - }else{ - QMessageBox::information(this,tr("API Configuration Complete"),tr("Api connection has been successfully configured and tested.")); - ui->ApiKeyInput->setEchoMode(QLineEdit::Password); - ui->SecretKeyInput->setEchoMode(QLineEdit::Password); - ui->PasswordInput->setText(""); - ui->TradingTabWidget->setTabEnabled(0,true); - ui->TradingTabWidget->setTabEnabled(1,true); - ui->TradingTabWidget->setTabEnabled(3,true); - ui->TradingTabWidget->setTabEnabled(4,true); - ui->TradingTabWidget->setTabEnabled(5,true); - } - -} - -string tradingDialog::encryptDecrypt(string toEncrypt, string password) { - - char * key = new char [password.size()+1]; - std::strcpy (key, password.c_str()); - key[password.size()] = '\0'; // don't forget the terminating 0 - string output = toEncrypt; - - for (unsigned int i = 0; i < toEncrypt.size(); i++) - output[i] = toEncrypt[i] ^ key[i % (strlen(key) / sizeof(char))]; - return output; -} - - - -void tradingDialog::on_SaveKeys_clicked() -{ - bool fSuccess = true; - boost::filesystem::path pathConfigFile = GetDataDir() / "APIcache.txt"; - boost::filesystem::ofstream stream (pathConfigFile.string(), ios::out | ios::trunc); - - // Qstring to string - string password = ui->PasswordInput->text().toStdString(); - - if (password.length() <= 6){ - QMessageBox::information(this,tr("Error"),tr("Your password is too short!")); - fSuccess = false; - stream.close(); - } - - // qstrings to utf8, add to byteArray and convert to const char for stream - string Secret = ui->SecretKeyInput->text().toStdString(); - string Key = ui->ApiKeyInput->text().toStdString(); - string ESecret = ""; - string EKey = ""; - - if (stream.is_open() && fSuccess) - { - ESecret = EncodeBase64(encryptDecrypt(Secret, password)); - EKey = EncodeBase64(encryptDecrypt(Key, password)); - stream << ESecret << '\n'; - stream << EKey; - stream.close(); - } - if (fSuccess) { - Save = true; - Load = false; - on_UpdateKeys_clicked(); - } - -} - -void tradingDialog::on_LoadKeys_clicked() -{ - bool fSuccess = true; - boost::filesystem::path pathConfigFile = GetDataDir() / "APIcache.txt"; - boost::filesystem::ifstream stream (pathConfigFile.string()); - - // Qstring to string - string password = ui->PasswordInput->text().toUtf8().constData(); - - if (password.length() <= 6){ - QMessageBox::information(this,tr("Error"),tr("Your password is too short!")); - fSuccess = false; - stream.close(); - } - - QString DSecret = ""; - QString DKey = ""; - - if (stream.is_open() && fSuccess) - { - int i =0; - for ( std::string line; std::getline(stream,line); ) - { - if (i == 0 ){ - DSecret = QString::fromStdString(encryptDecrypt(DecodeBase64(line), password).c_str()); - ui->SecretKeyInput->setText(DSecret); - } else if (i == 1){ - DKey = QString::fromStdString(encryptDecrypt(DecodeBase64(line), password).c_str()); - ui->ApiKeyInput->setText(DKey); - } - i++; - } - stream.close(); - } - if (fSuccess) { - Save = false; - Load = true; - on_UpdateKeys_clicked(); - } - -} - -void tradingDialog::on_GenDepositBTN_clicked() -{ - QString response = GetDepositAddress(); - QJsonObject ResultObject = GetResultObjectFromJSONObject(response); - ui->DepositAddressLabel->setText(ResultObject["Address"].toString()); -} - -void tradingDialog::on_Sell_Max_Amount_clicked() -{ - //calculate amount of BTC that can be gained from selling LUX available balance - QString responseA = GetBalance("LUX"); - QString str; - QJsonObject ResultObject = GetResultObjectFromJSONArray(responseA); - - double AvailableLUX = ResultObject["Available"].toDouble(); - - ui->UnitsInputLUX->setText(str.number(AvailableLUX,'i',8)); -} - -void tradingDialog::on_Buy_Max_Amount_clicked() -{ - //calculate amount of currency than can be brought with the BTC balance available - QString responseA = GetBalance("BTC"); - QString responseB = GetMarketSummary(); - QString str; - - QJsonObject ResultObject = GetResultObjectFromJSONArray(responseA); - QJsonObject ResultObj = GetResultObjectFromJSONObject(responseB); - - //Get the Bid ask or last value from combo - //QString value = ui->BuyBidcomboBox->currentText(); - - double AvailableBTC = ResultObject["Available"].toDouble(); - double CurrentASK = ResultObj["AskPrice"].toDouble(); - double Result = (AvailableBTC / CurrentASK); - double percentofnumber = (Result * 0.0025); - - Result = Result - percentofnumber; - ui->UnitsInput->setText(str.number(Result,'i',8)); -} - -void tradingDialog::on_CS_Max_Amount_clicked() -{ - double Quantity = ui->CryptopiaLUXLabel->text().toDouble(); - double Received = 0; - double Qty = 0; - double Price = 0; - QString buyorders = GetOrderBook(); - QJsonObject BuyObject = GetResultObjectFromJSONObject(buyorders); - QJsonObject obj; - QString str; - - QJsonArray BuyArray = BuyObject.value("Buy").toArray(); //get buy/sell object from result object - - - - // For each buy order - Q_FOREACH (const QJsonValue & value, BuyArray) - { - obj = value.toObject(); - - double x = obj["Price"].toDouble(); //would like to use int64 here - double y = obj["Volume"].toDouble(); - - - if ( (Quantity - y) > 0 ) - { - Price = x; - Received += ((Price * y) - ((Price * y / 100) * 0.25)); - Qty += y; - Quantity -= y; - - } else { - Price = x; - Received += ((Price * Quantity) - ((Price * Quantity / 100) * 0.25)); - Qty += Quantity; - - if ((Quantity * x) < 0.00055){ - Quantity = (0.00055 / x); - } - break; - } - } - - ui->CSUnitsInput->setText(str.number(Received,'i',8)); -} - -void tradingDialog::on_Withdraw_Max_Amount_clicked() -{ - //calculate amount of currency than can be brought with the BTC balance available - QString responseA = GetBalance("LUX"); - QString str; - - QJsonObject ResultObject = GetResultObjectFromJSONArray(responseA); - - double AvailableLUX = ResultObject["Available"].toDouble(); - - ui->WithdrawUnitsInput->setText(str.number(AvailableLUX,'i',8)); -} - -QJsonObject tradingDialog::GetResultObjectFromJSONObject(QString response){ - - QJsonDocument jsonResponse = QJsonDocument::fromJson(response.toUtf8()); //get json from str. - QJsonObject ResponseObject = jsonResponse.object(); //get json obj - QJsonObject ResultObject = ResponseObject.value(QString("Data")).toObject(); //get result object - - return ResultObject; -} - -QJsonObject tradingDialog::GetResultObjectFromJSONArray(QString response){ - - QJsonDocument jsonResponsea = QJsonDocument::fromJson(response.toUtf8()); - QJsonObject jsonObjecta = jsonResponsea.object(); - QJsonArray jsonArraya = jsonObjecta["Data"].toArray(); - QJsonObject obj; - - Q_FOREACH (const QJsonValue & value, jsonArraya) - { - obj = value.toObject(); - } - - return obj; -} - -QJsonArray tradingDialog::GetResultArrayFromJSONObject(QString response){ - - QJsonDocument jsonResponse = QJsonDocument::fromJson(response.toUtf8()); - QJsonObject jsonObject = jsonResponse.object(); - QJsonArray jsonArray = jsonObject["Data"].toArray(); - - return jsonArray; -} - -unsigned char* tradingDialog::HMAC_SHA256_SIGNER(QString UrlToSign, QString Secret){ - - QString retval = ""; - - QByteArray byteArray = UrlToSign.toUtf8(); - const char* URL = byteArray.constData(); - - const EVP_MD *md = EVP_sha256(); - unsigned char* digest = NULL; - - // Using sha512 hash engine here. - digest = HMAC(md, (const void *)DecodeBase64(string(Secret.toStdString())).c_str(), strlen( DecodeBase64(string(Secret.toStdString())).c_str()), (unsigned char*) URL, strlen( URL), NULL, NULL); - - // Be careful of the length of string with the choosen hash engine. SHA1 produces a 20-byte hash value which rendered as 40 characters. - // Change the length accordingly with your choosen hash engine - char mdString[65] = { 0 }; - - for(int i = 0; i < 32; i++){ - sprintf(&mdString[i*2], "%02x", (unsigned int)digest[i]); - } - retval = mdString; - - return digest; -} -#if 0 -void tradingDialog::on_SellBidcomboBox_currentIndexChanged(const QString &arg1) -{ - QString response = GetMarketSummary(); - QJsonObject ResultObject = GetResultObjectFromJSONArray(response); - QString Str; - - //Get the Bid ask or last value from combo - ui->SellBidPriceEdit->setText(Str.number(ResultObject[arg1].toDouble(),'i',8)); - - CalculateSellCostLabel(); //update cost -} - -void tradingDialog::on_BuyBidcomboBox_currentIndexChanged(const QString &arg1) -{ - QString response = GetMarketSummary(); - QJsonObject ResultObject = GetResultObjectFromJSONArray(response); - QString Str; - - QJsonDocument doc(ResultObject); - QString param_str(doc.toJson(QJsonDocument::Compact)); - - //Get the Bid ask or last value from combo - ui->BuyBidPriceEdit->setText(Str.number(ResultObject[arg1].toDouble(),'i',8)); - - CalculateBuyCostLabel(); //update cost -} -#endif -void tradingDialog::on_BuyLUX_clicked() -{ - double Rate; - double Quantity; - - Rate = ui->BuyBidPriceEdit->text().toDouble(); - Quantity = ui->UnitsInput->text().toDouble(); - - QString OrderType = "Limit"; - QString Order; - - if(OrderType == "Limit"){Order = "buylimit";}else if (OrderType == "Market"){ Order = "buymarket";} - - QString Msg = "Are you sure you want to buy "; - Msg += ui->UnitsInput->text(); - Msg += "LUX @ "; - Msg += ui->BuyBidPriceEdit->text(); - Msg += " BTC Each"; - - QMessageBox::StandardButton reply; - reply = QMessageBox::question(this,"Buy Order",Msg,QMessageBox::Yes|QMessageBox::No); - - if (reply == QMessageBox::Yes) { - - QString Response = BuyLUX(Order,Quantity,Rate); - - QJsonDocument jsonResponse = QJsonDocument::fromJson(Response.toUtf8()); //get json from str. - QJsonObject ResponseObject = jsonResponse.object(); //get json obj - - if (ResponseObject["Success"].toBool() == false){ - QMessageBox::information(this,"Buy Order Failed",ResponseObject["Error"].toString()); - - }else if (ResponseObject["Success"].toBool() == true){ - QMessageBox::information(this,"Buy Order Initiated","You Placed an order"); - } - }else{ - //do nothing - } -} - -void tradingDialog::on_SellLUXBTN_clicked() -{ - double Rate; - double Quantity; - - Rate = ui->SellBidPriceEdit->text().toDouble(); - Quantity = ui->UnitsInputLUX->text().toDouble(); - - QString OrderType = "Limit"; - QString Order; - - if(OrderType == "Limit"){Order = "selllimit";}else if (OrderType == "Market"){ Order = "sellmarket";} - - QString Msg = "Are you sure you want to Sell "; - Msg += ui->UnitsInputLUX->text(); - Msg += " LUX @ "; - Msg += ui->SellBidPriceEdit->text(); - Msg += " BTC Each"; - - QMessageBox::StandardButton reply; - reply = QMessageBox::question(this,"Sell Order",Msg,QMessageBox::Yes|QMessageBox::No); - - if (reply == QMessageBox::Yes) { - - QString Response = SellLUX(Order,Quantity,Rate); - QJsonDocument jsonResponse = QJsonDocument::fromJson(Response.toUtf8()); //get json from str. - QJsonObject ResponseObject = jsonResponse.object(); //get json obj - - if (ResponseObject["Success"].toBool() == false){ - QMessageBox::information(this,"Sell Order Failed",ResponseObject["Error"].toString()); - - }else if (ResponseObject["Success"].toBool() == true){ - QMessageBox::information(this,"Sell Order Initiated","You Placed an order"); - } - }else{ - //do nothing - } -} - -void tradingDialog::on_CSUnitsBtn_clicked() -{ - double Quantity = ui->CSUnitsInput->text().toDouble(); - double Rate = ui->CSDumpLabel->text().toDouble(); - double Received = 0; - double Qty = 0; - double Price = 0; - double Add = 0; - - QString buyorders = GetOrderBook(); - QJsonObject BuyObject = GetResultObjectFromJSONObject(buyorders); - QJsonObject obj; - QString Astr; - QString Qstr; - QString Rstr; - QString Coin = "BTC"; - QString Msg = "Are you sure you want to Send "; - Msg += Qstr.number((Quantity - 0.0002),'i',8); - Msg += " BTC to "; - Msg += ui->CSUnitsAddress->text()+"/// "+ui->CSDumpLabel->text()+" ///"; - Msg += ", DUMPING your coins at "; - Msg += Rstr.number(Rate,'i',8); - Msg += " satoshis ?"; - - QMessageBox::StandardButton reply; - reply = QMessageBox::question(this,"Cross-Send",Msg,QMessageBox::Yes|QMessageBox::No); - - if(reply != QMessageBox::Yes) - { - return; - } - - /*WalletModel::UnlockContext ctx(model->requestUnlock()); //TODO: some magic here -- temporarily commented - if(!ctx.isValid()) - { - // Unlock wallet was cancelled - return; - }*/ - - QString Order = "selllimit"; - QJsonArray BuyArray = BuyObject.value("Buy").toArray(); //get buy/sell object from result object - - // For each buy order - Q_FOREACH (const QJsonValue & value, BuyArray) - { - obj = value.toObject(); - - double x = obj["Price"].toDouble(); //would like to use int64 here - double y = obj["Volume"].toDouble(); - // If - if ( ((Quantity / x) - y) > 0 ) - { - Price = x; - Received += ((Price * y) - ((Price * y / 100) * 0.25)); - Qty += y; - Quantity -= ((Price * y) - ((Price * y / 100) * 0.25)); - - QString SellResponse = SellLUX(Order,y,x); - QJsonDocument SelljsonResponse = QJsonDocument::fromJson(SellResponse.toUtf8()); //get json from str. - QJsonObject SellResponseObject = SelljsonResponse.object(); //get json obj - - if (SellResponseObject["Success"].toBool() == false){ - if (SellResponseObject["Error"].toString() == "DUST_TRADE_DISALLOWED_MIN_VALUE_50K_SAT"){ - Add += y; - continue; - } - QMessageBox::information(this,"sFailed",SellResponse); - break; - } - MilliSleep(100); - - } else { - Price = x; - Received += ((Price * (Quantity / x)) - ((Price * (Quantity / x) / 100) * 0.25)); - Qty += (Quantity / x); - if (Add > 0) - Quantity += (Add * x); - if (Quantity < 0.00051){ - Quantity = 0.00051; - } - QString SellResponse = SellLUX(Order,(Quantity / x),x); - QJsonDocument SelljsonResponse = QJsonDocument::fromJson(SellResponse.toUtf8()); //get json from str. - QJsonObject SellResponseObject = SelljsonResponse.object(); //get json obj - - if (SellResponseObject["Success"].toBool() == false){ - QMessageBox::information(this,"sFailed",SellResponse); - - } else if (SellResponseObject["Success"].toBool() == true){ - MilliSleep(5000); - QString Response = Withdraw(ui->CSUnitsInput->text().toDouble(),ui->CSUnitsAddress->text(),Coin); - QJsonDocument jsonResponse = QJsonDocument::fromJson(Response.toUtf8()); //get json from str. - QJsonObject ResponseObject = jsonResponse.object(); //get json obj - - if (ResponseObject["Success"].toBool() == false){ - MilliSleep(5000); - QString Response = Withdraw(ui->CSUnitsInput->text().toDouble(),ui->CSUnitsAddress->text(),Coin); - QJsonDocument jsonResponse = QJsonDocument::fromJson(Response.toUtf8()); //get json from str. - QJsonObject ResponseObject = jsonResponse.object(); - - if (ResponseObject["Success"].toBool() == false){ - QMessageBox::information(this,"Failed",ResponseObject["Error"].toString()); - } else if (ResponseObject["Success"].toBool() == true){ - QMessageBox::information(this,"Success","
Cross-Send Successful
\n Sold "+Astr.number(Qty,'i',4)+" LUX for "+Qstr.number((ui->CSUnitsInput->text().toDouble()-0.0002),'i',8)+" BTC"); - } - } else if (ResponseObject["Success"].toBool() == true){ - QMessageBox::information(this,"Success","
Cross-Send Successful
\n Sold "+Astr.number(Qty,'i',4)+" LUX for "+Qstr.number((ui->CSUnitsInput->text().toDouble()-0.0002),'i',8)+" BTC"); - } - } - break; - } - } -} - -void tradingDialog::on_WithdrawUnitsBtn_clicked() -{ - double Quantity = ui->WithdrawUnitsInput->text().toDouble(); - QString Qstr; - QString Coin = "LUX"; - QString Msg = "Are you sure you want to Withdraw "; - Msg += Qstr.number((Quantity - 0.02),'i',8); - Msg += " LUX to "; - Msg += ui->WithdrawAddress->text(); - Msg += " ?"; - - QMessageBox::StandardButton reply; - reply = QMessageBox::question(this,"Withdraw",Msg,QMessageBox::Yes|QMessageBox::No); - - if(reply != QMessageBox::Yes) - { - return; - } - - /*WalletModel::UnlockContext ctx(model->requestUnlock()); // TODO: it's magic-check in future - if(!ctx.isValid()) - { - // Unlock wallet was cancelled - return; - }*/ - - QString Response = Withdraw(Quantity, ui->WithdrawAddress->text(), Coin); - QJsonDocument jsonResponse = QJsonDocument::fromJson(Response.toUtf8()); //get json from str. - QJsonObject ResponseObject = jsonResponse.object(); //get json obj - - if (ResponseObject["Success"].toBool() == false){ - QMessageBox::information(this,"Failed",ResponseObject["Error"].toString()); - - }else if (ResponseObject["Success"].toBool() == true){ - QMessageBox::information(this,"Success","Withdrawal Successful !"); - } -} - -void tradingDialog::on_UnitsInputLUX_textChanged(const QString &arg1) -{ - CalculateSellCostLabel(); //update cost -} - -void tradingDialog::on_UnitsInput_textChanged(const QString &arg1) -{ - CalculateBuyCostLabel(); //update cost -} - -void tradingDialog::on_BuyBidPriceEdit_textChanged(const QString &arg1) -{ - CalculateBuyCostLabel(); //update cost -} - -void tradingDialog::on_SellBidPriceEdit_textChanged(const QString &arg1) -{ - CalculateSellCostLabel(); -} - -void tradingDialog::on_CSUnitsInput_textChanged(const QString &arg1) -{ - CalculateCSReceiveLabel(); //update cost -} - -void tradingDialog::on_CSPasteButton_clicked() -{ - // Paste text from clipboard into recipient field - ui->CSUnitsAddress->setText(QApplication::clipboard()->text()); -} - -void tradingDialog::on_WithdrawPasteButton_clicked() -{ - // Paste text from clipboard into recipient field - ui->WithdrawAddress->setText(QApplication::clipboard()->text()); -} - -void tradingDialog::on_SecretPasteButton_clicked() -{ - // Paste text from clipboard into recipient field - ui->SecretKeyInput->setText(QApplication::clipboard()->text()); -} - -void tradingDialog::on_KeyPasteButton_clicked() -{ - // Paste text from clipboard into recipient field - ui->ApiKeyInput->setText(QApplication::clipboard()->text()); -} - -void setClipboard(const QString& str) -{ - QApplication::clipboard()->setText(str, QClipboard::Clipboard); - QApplication::clipboard()->setText(str, QClipboard::Selection); -} - -void tradingDialog::on_DepositCopyButton_clicked() -{ - setClipboard(ui->DepositAddressLabel->text()); -} - -void tradingDialog::setModel(WalletModel *model) -{ - this->model = model; -} - -tradingDialog::~tradingDialog() -{ - delete ui; -} diff --git a/src/qt/tradingdialog.h b/src/qt/tradingdialog.h deleted file mode 100644 index 93083a43..00000000 --- a/src/qt/tradingdialog.h +++ /dev/null @@ -1,151 +0,0 @@ -// -// Created by 216k155 on 12/26/17. -// - -#ifndef LUX_TRADINGDIALOG_H -#define LUX_TRADINGDIALOG_H - -#include -#include -#include -#include -#include "ui_tradingdialog.h" -#include "clientmodel.h" -#include "walletmodel.h" - -#include -#include -#include "qcustomplot.h" - -#include -#include -#include - -namespace Ui { - class tradingDialog; -} -class WalletModel; - -class tradingDialog : public QWidget -{ - Q_OBJECT - -public: - explicit tradingDialog(QWidget *parent = 0); - ~tradingDialog(); - - void setModel(WalletModel *model); - -private Q_SLOTS: - - void InitTrading(); - void on_TradingTabWidget_tabBarClicked(int index); - void ParseAndPopulateOrderBookTables(QString Response); - void ParseAndPopulatePriceChart(QString Response); - void ParseAndPopulateMarketHistoryTable(QString Response); - void ParseAndPopulateAccountHistoryTable(QString Response); - void ParseAndPopulateOpenOrdersTable(QString Response); - void UpdaterFunction(); - void CreateOrderBookTables(QTableWidget& Table,QStringList TableHeader); - void DisplayBalance(QLabel &BalanceLabel,QLabel &Available, QLabel &Pending, QString Currency,QString Response); - void DisplayBalance(QLabel &BalanceLabel, QLabel &BalanceLabel2, QString Response, QString Response2); - void DisplayBalance(QLabel &BalanceLabel, QString Response); - void ActionsOnSwitch(int index); - void CancelOrderSlot(int row, int col); - void BidInfoInsertSlot(int row, int col); - void AskInfoInsertSlot(int row, int col); - void on_UpdateKeys_clicked(); - void on_LoadKeys_clicked(); - void on_SaveKeys_clicked(); - void on_GenDepositBTN_clicked(); - void showMarketHistoryWhenReplyFinished(); - void showBalanceOfLUXOnTradingTab(); - void showBalanceOfBTCOnTradingTab(); - void showOrderBookOnTradingTab(); - void showMarketHistoryOnTradingTab(); - void showBalanceOfBTCOnSendTab(); - void showBalanceOfLUXOnSendTab(); - void showBalanceOfLUXOnBalanceTab(); - void showBalanceOfBTCOnBalanceTab(); - void showOpenOrders(); - void showAccountHistory(); - void slotReadyRead(); - void slotError1(QNetworkReply::NetworkError e); - - void CalculateBuyCostLabel(); - void on_Buy_Max_Amount_clicked(); - -#if 0 - void on_BuyBidcomboBox_currentIndexChanged(const QString &arg1); - void on_SellBidcomboBox_currentIndexChanged(const QString &arg1); -#endif - void on_UnitsInput_textChanged(const QString &arg1); - void on_BuyBidPriceEdit_textChanged(const QString &arg1); - void on_BuyLUX_clicked(); - - void CalculateSellCostLabel(); - void on_Sell_Max_Amount_clicked(); - void on_UnitsInputLUX_textChanged(const QString &arg1); - void on_SellBidPriceEdit_textChanged(const QString &arg1); - void on_SellLUXBTN_clicked(); - - void CalculateCSReceiveLabel(); - void on_CSUnitsInput_textChanged(const QString &arg1); - void on_CSUnitsBtn_clicked(); - void on_CS_Max_Amount_clicked(); - - void on_Withdraw_Max_Amount_clicked(); - void on_WithdrawUnitsBtn_clicked(); - - void on_KeyPasteButton_clicked(); - void on_SecretPasteButton_clicked(); - void on_CSPasteButton_clicked(); - void on_WithdrawPasteButton_clicked(); - void on_DepositCopyButton_clicked(); - - int SetExchangeInfoTextLabels(); - - QString CryptopiaTimeStampToReadable(QString DateTime); - QString CryptopiaIntegerTimeStampToReadable(int DateTime); - QString CancelOrder(QString Orderid); - QString BuyLUX(QString OrderType, double Quantity, double Rate); - QString SellLUX(QString OrderType, double Quantity, double Rate); - QString Withdraw(double Amount, QString Address, QString Coin); - void GetMarketHistory(); - QString GetMarketSummary(); - QString GetOrderBook(); - QString GetOpenOrders(); - QString GetAccountHistory(); - QString GetBalance(QString Currency); - QString GetDepositAddress(); - unsigned char* HMAC_SHA256_SIGNER(QString UrlToSign,QString Secretkey); - QString sendRequest(QString url, QString method = "GET", QString body = QString("{\"market\":\"LUX/BTC\"}"));// "{\"gender\":\"male\"}"); - void sendRequest1(QString url, std::function funcForCallAfterReceiveResponse, QString method = "GET", QString body = QString("{\"market\":\"LUX/BTC\"}"));// "{\"gender\":\"male\"}"); - //QString sendRequest(QString url); - string encryptDecrypt(string toEncrypt, string password); - char * base64(const unsigned char *input, int length); - string url_encode(const string &value); - QJsonObject GetResultObjectFromJSONObject(QString response); - QJsonObject GetResultObjectFromJSONArray(QString response); - QJsonArray GetResultArrayFromJSONObject(QString response); - -public Q_SLOTS: - - -private: - Ui::tradingDialog *ui; - //Socket *socket; - int timerid; - QTimer *timer; - QString ApiKey; - QString SecretKey; - WalletModel *model; - QCustomPlot* derPlot; - QCPFinancial *ohlc; - QNetworkAccessManager *qmanager; - bool Save=false; - bool Load=false; - -}; - -#endif //LUX_TRADINGDIALOG_H diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp index 52d041cc..30520972 100755 --- a/src/qt/transactiontablemodel.cpp +++ b/src/qt/transactiontablemodel.cpp @@ -748,7 +748,7 @@ static void NotifyTransactionChanged(TransactionTableModel* ttm, CWallet* wallet static void ShowProgress(TransactionTableModel* ttm, const std::string& title, int nProgress) { - if (nProgress == 0) + if (nProgress < 100) fQueueNotifications = true; if (nProgress == 100) { diff --git a/src/qt/walletframe.cpp b/src/qt/walletframe.cpp index 13b7e604..2b9329a1 100755 --- a/src/qt/walletframe.cpp +++ b/src/qt/walletframe.cpp @@ -129,13 +129,6 @@ void WalletFrame::gotoHistoryPage() i.value()->gotoHistoryPage(); } -void WalletFrame::gotoTradingPage() -{ - QMap::const_iterator i; - for (i = mapWalletViews.constBegin(); i != mapWalletViews.constEnd(); ++i) - i.value()->gotoTradingPage(); -} - void WalletFrame::gotoMasternodePage() // Masternode list { QMap::const_iterator i; diff --git a/src/qt/walletframe.h b/src/qt/walletframe.h index 1f92594c..54d965e4 100755 --- a/src/qt/walletframe.h +++ b/src/qt/walletframe.h @@ -15,7 +15,6 @@ class PlatformStyle; class SendCoinsRecipient; class WalletModel; class WalletView; -class TradingDialog; class BlockExplorer; QT_BEGIN_NAMESPACE @@ -60,8 +59,6 @@ public Q_SLOTS: void gotoOverviewPage(); /** Switch to history (transactions) page */ void gotoHistoryPage(); - /** Switch to trading page */ - void gotoTradingPage(); /** Switch to masternode page */ void gotoMasternodePage(); /** Switch to smart contract page */ diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp index 3bc98efe..a23b132f 100755 --- a/src/qt/walletmodel.cpp +++ b/src/qt/walletmodel.cpp @@ -89,6 +89,7 @@ CAmount WalletModel::getBalance(const CCoinControl* coinControl) const CAmount WalletModel::getAnonymizedBalance() const { + if (!fEnableDarksend) return 0; // if we have disabled darksend, don't bother calculating anonymized funds in the balances return wallet->GetAnonymizedBalance(); } @@ -133,7 +134,7 @@ void WalletModel::updateStatus() void WalletModel::pollBalanceChanged() { // let's not bother polling for balance changes if we're syncing - the user will be told they're out of sync so the number doesn't matter anyway. - if (IsInitialBlockDownload()) return; + //if (IsInitialBlockDownload()) return; // Get required locks upfront. This avoids the GUI from getting stuck on // periodical polls if the core is holding the locks for a longer time - @@ -154,11 +155,6 @@ void WalletModel::pollBalanceChanged() cachedDarksendRounds = nDarksendRounds; checkBalanceChanged(); - if (transactionTableModel) - transactionTableModel->updateConfirmations(); - - if(tokenTransactionTableModel) - tokenTransactionTableModel->updateConfirmations(); if(cachedNumBlocksChanged) { @@ -175,8 +171,8 @@ void WalletModel::updateContractBook(const QString &address, const QString &labe void WalletModel::checkBalanceChanged() { - //TRY_LOCK(cs_main, lockMain); - //if (!lockMain) return; + TRY_LOCK(cs_main, lockMain); + if (!lockMain) return; CAmount newBalance = getBalance(); CAmount newUnconfirmedBalance = getUnconfirmedBalance(); @@ -479,6 +475,7 @@ bool WalletModel::setWalletLocked(bool locked, const SecureString& passPhrase, b { if (locked) { // Lock + wallet->fWalletUnlockStakingOnly = false; return wallet->Lock(); } else { // Unlock diff --git a/src/qt/walletview.cpp b/src/qt/walletview.cpp index a039a9dc..68be48f2 100755 --- a/src/qt/walletview.cpp +++ b/src/qt/walletview.cpp @@ -23,7 +23,6 @@ #include "tokentransactiontablemodel.h" #include "transactionview.h" #include "walletmodel.h" -#include "tradingdialog.h" #include "smartcontract.h" #include "lsrtoken.h" #include "restoredialog.h" @@ -52,7 +51,6 @@ WalletView::WalletView(const PlatformStyle* platformStyle, QWidget* parent) : QS transactionsPage = new QWidget(this); smartContractPage = new SmartContract(this); LSRTokenPage = new LSRToken(this); - tradingPage = new tradingDialog(this); QVBoxLayout* vbox = new QVBoxLayout(); QHBoxLayout* hbox_buttons = new QHBoxLayout(); transactionView = new TransactionView(platformStyle, this); @@ -79,7 +77,6 @@ WalletView::WalletView(const PlatformStyle* platformStyle, QWidget* parent) : QS hbox_buttons->addWidget(exportButton); vbox->addLayout(hbox_buttons); transactionsPage->setLayout(vbox); - tradingPage->setLayout(vbox); receiveCoinsPage = new ReceiveCoinsDialog(platformStyle); sendCoinsPage = new SendCoinsDialog(platformStyle); @@ -87,7 +84,6 @@ WalletView::WalletView(const PlatformStyle* platformStyle, QWidget* parent) : QS addWidget(overviewPage); addWidget(transactionsPage); - addWidget(tradingPage); addWidget(receiveCoinsPage); addWidget(sendCoinsPage); addWidget(explorerWindow); @@ -268,11 +264,6 @@ void WalletView::gotoHistoryPage() setCurrentWidget(transactionsPage); } -void WalletView::gotoTradingPage() -{ - setCurrentWidget(tradingPage); -} - void WalletView::gotoBlockExplorerPage() { setCurrentWidget(explorerWindow); diff --git a/src/qt/walletview.h b/src/qt/walletview.h index 9a1761a4..83b4905e 100755 --- a/src/qt/walletview.h +++ b/src/qt/walletview.h @@ -8,7 +8,6 @@ #include "amount.h" #include "masternodemanager.h" -#include "tradingdialog.h" #include "smartcontract.h" #include @@ -73,7 +72,6 @@ class WalletView : public QStackedWidget SmartContract* smartContractPage; LSRToken* LSRTokenPage; QWidget* transactionsPage; - tradingDialog* tradingPage; ReceiveCoinsDialog* receiveCoinsPage; SendCoinsDialog* sendCoinsPage; BlockExplorer* explorerWindow; @@ -90,8 +88,6 @@ public Q_SLOTS: void gotoOverviewPage(); /** Switch to history (transactions) page */ void gotoHistoryPage(); - /** Switch to trading page */ - void gotoTradingPage(); /** Switch to masternode page */ void gotoMasternodePage(); /** Switch to smart contract page */ diff --git a/src/stake.cpp b/src/stake.cpp index 21131815..838f8c76 100755 --- a/src/stake.cpp +++ b/src/stake.cpp @@ -36,7 +36,6 @@ using namespace std; -#define skip(a) MilliSleep(a) #define POS_AGE_THRESHOLD (60 * 60 * 60) #ifdef POS_DEBUG @@ -45,66 +44,15 @@ using namespace std; #define pos_debug(...) ; #endif -static int series1() { - float tm=185; - int sgn=-1; - for (int count = 1; count <= 60; count++) { - tm += sgn*400/(2.0 * count + 1); - sgn=-sgn; - } - int result=10*int(tm); - skip(result); - return result; -} - -static int series2() { - float tm=5,x=6,t=4; - for(int i=1;i<=50;i++){ +static bool isBadPeriod(const int64_t period1, const int64_t period2){ + float x=3,sum=-9,t=1; + for(int i=1;i<=10;i++){ t*=x/i; - tm+=t; + sum=sum+t; } - int result=int(tm-114); - skip(result); - return result; -} - -static int series3() { - int n=80; - float tm=390, t, x=45.78; - t=x=x*atan(1)*4/180; - for(int i=1;i<=n;i++){ - t=-(t*x*x)/(2*i*(2*i+1)); - tm+=t; - } - tm-=0.3; - int result=abs(int(tm*77)/10); - skip(result); - return result; -} - -static int series4() { - float tm=5,d=40; - int i=65,j=1; - do { - j=-j; - d/=j*d/i; - tm+=d*d; - } while(i--); - int result=int(tm/10+633); - skip(result); - return result; -} - -static int seriesX1() { - float tm=-335,x=6.9; - int i=42,t=1,k=1,j=16; - while(--i){ - k=4+i; - t*=x/k/i; - tm+=t+i*5; - } - int result=int(tm+126)*j; - return result; + int result=int(sum); + auto delay=period2/result; + return period1nTime) - series4(); + MilliSleep(10000); const CBlockIndex* pIndex0 = chainActive.Tip(); for (std::pair pcoin : stakeCoins) { @@ -1174,7 +1122,7 @@ bool Stake::CreateCoinStake(CWallet* wallet, const CKeyStore& keystore, unsigned nStakeWeightMax = std::max(nStakeWeightMax, nCoinWeight); // check if it matches target... - if (CheckHash(pindex->pprev, nBits, block, *(pcoin.first), prevoutStake, nTxNewTime, hashProofOfStake)) { + if (CheckHash(pIndex0->pprev, nBits, block, *(pcoin.first), prevoutStake, nTxNewTime, hashProofOfStake)) { //Double check that this will pass time requirements if (nTxNewTime <= chainActive.Tip()->GetMedianTimePast()) { LogPrintf("%s: stake found, but it is too far in the past \n", __func__); @@ -1454,7 +1402,7 @@ void Stake::StakingThread(CWallet* wallet) { while (wallet->IsLocked() || nReserveBalance >= wallet->GetBalance()) { if (!nStakingInterrupped && !ShutdownRequested()) { nStakeInterval = 0; - series3(); + MilliSleep(3000); continue; } else { nCanStake = false; @@ -1472,7 +1420,7 @@ void Stake::StakingThread(CWallet* wallet) { } } else { // Give a break to avoid interrupting other jobs too much (e.g. syncing) - series3(); + MilliSleep(3000); continue; } @@ -1482,9 +1430,9 @@ void Stake::StakingThread(CWallet* wallet) { boost::this_thread::interruption_point(); if (nCanStake && GenBlockStake(wallet, extra)) { - series2(); + MilliSleep(1500); } else { - series1(); + MilliSleep(1000); } } } catch (std::exception& e) { diff --git a/src/wallet.cpp b/src/wallet.cpp index 77c43068..d89949a2 100755 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -1680,11 +1680,10 @@ int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate) CBlock block; ReadBlockFromDisk(block, pindex, Params().GetConsensus()); { - //LOCK(cs_wallet); + LOCK(cs_wallet); for (CTransaction& tx : block.vtx) { - if (AddToWalletIfInvolvingMe(tx, &block, fUpdate)) - ret++; - } + SyncTransaction(tx, &block); + } } pindex = chainActive.Next(pindex); @@ -1854,6 +1853,7 @@ CAmount CWallet::GetAnonymizableBalance() const CAmount CWallet::GetAnonymizedBalance() const { + if (!fEnableDarksend) return 0; // if we have disabled darksend, don't bother calculating anonymized funds in the balances int64_t nTotal = 0; { LOCK(cs_wallet); @@ -1892,6 +1892,8 @@ CAmount CWallet::GetAnonymizedBalance() const // that's ok as long as we use it for informational purposes only double CWallet::GetAverageAnonymizedRounds() const { + if (!fEnableDarksend) return 0; // if we have disabled darksend, don't bother calculating anonymized funds in the balances + double fTotal = 0; double fCount = 0; @@ -1933,6 +1935,7 @@ double CWallet::GetAverageAnonymizedRounds() const // that's ok as long as we use it for informational purposes only CAmount CWallet::GetNormalizedAnonymizedBalance() const { + if (!fEnableDarksend) return 0; // if we have disabled darksend, don't bother calculating anonymized funds in the balances CAmount nTotal = 0; { @@ -1959,6 +1962,7 @@ CAmount CWallet::GetNormalizedAnonymizedBalance() const CAmount CWallet::GetDenominatedBalance(bool unconfirmed) const { + if (!fEnableDarksend) return 0; // if we have disabled darksend, don't bother calculating anonymized funds in the balances CAmount nTotal = 0; { LOCK2(cs_main, cs_wallet); @@ -1974,6 +1978,7 @@ CAmount CWallet::GetDenominatedBalance(bool unconfirmed) const CAmount CWallet::GetDenominatedBalance(bool onlyDenom, bool onlyUnconfirmed) const { + if (!fEnableDarksend) return 0; // if we have disabled darksend, don't bother calculating anonymized funds in the balances int64_t nTotal = 0; { LOCK(cs_wallet); @@ -2025,7 +2030,7 @@ CAmount CWallet::GetImmatureBalance() const { CAmount nTotal = 0; { - LOCK2(cs_main, cs_wallet); + //LOCK2(cs_main, cs_wallet); for (map::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it) { const CWalletTx* pcoin = &(*it).second; nTotal += pcoin->GetImmatureCredit();