Skip to content

Commit

Permalink
Add the batch of release v3.4.1 commits
Browse files Browse the repository at this point in the history
  • Loading branch information
developer-at-bcn committed Mar 7, 2019
1 parent 5490fb4 commit 89b0094
Show file tree
Hide file tree
Showing 26 changed files with 423 additions and 281 deletions.
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
build/
bin/
Windows Installer/Debug/
Windows Installer/Release/
Windows Installer/.vs/

build-bytecoin-gui*

*~
CMakeLists.txt.user*
*.pro.user

# Mac specific
.DS_Store
11 changes: 10 additions & 1 deletion ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
## Release Notes

### v3.4.1

- Fixed creating Amethyst wallets.
- Added support of the new format of sendproofs.
- Fixed mnemonic export.
- Added an option that view-only wallets can detect outgoing addresses.
- Made minor improvements and bug fixes.
- Update the Bytecoin daemons.

### v3.4.0

- Updated the Bytecoin daemons.
Expand All @@ -11,7 +20,7 @@

### v3.4.0-beta-20181212

- Added HD wallets (BIP 39) support.
- Added support of deterministic wallets (BIP 39).
- Improved `walletd` parameters dialog box.
- Added stagenet/testnet support.
- Improved external nodes support.
Expand Down
14 changes: 7 additions & 7 deletions Windows Installer/Installer.vdproj
Original file line number Diff line number Diff line change
Expand Up @@ -1509,23 +1509,23 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:Bytecoin"
"ProductCode" = "8:{D9F64938-1870-4947-B9C0-0A3A3543D4C1}"
"PackageCode" = "8:{E196DC0A-E9C1-4999-B8B9-EB0E847C0C7E}"
"ProductCode" = "8:{D9D78741-9E49-49BB-A310-DCAC6CBF5F42}"
"PackageCode" = "8:{77284CC6-1E09-453C-AA55-B6F04240B8F8}"
"UpgradeCode" = "8:{DC5C7D60-BB08-4B97-B634-E87679CCEB3C}"
"AspNetVersion" = "8:"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
"ProductVersion" = "8:19.2.7"
"ProductVersion" = "8:19.3.7"
"Manufacturer" = "8:Bytecoin Developers"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"
"Title" = "8:Bytecoin 3.4.0 Installer"
"Title" = "8:Bytecoin 3.4.1 Installer"
"Subject" = "8:"
"ARPCONTACT" = "8:Bytecoin Developers"
"Keywords" = "8:"
"ARPCOMMENTS" = "8:Release version of bytecoin from 07 Feb 2019"
"ARPCOMMENTS" = "8:Release version of bytecoin from 07 Mar 2019"
"ARPURLINFOABOUT" = "8:https://bytecoin.org"
"ARPPRODUCTICON" = "8:_ABCF8F071D16461785EDF6D56ED2ABCE"
"ARPIconIndex" = "3:0"
Expand Down Expand Up @@ -1732,7 +1732,7 @@
"ContextData" = "8:"
"Attributes" = "3:0"
"Setting" = "3:2"
"Value" = "8:Release version 3.4.0 of bytecoin core and GUI wallet from 2019/02/07."
"Value" = "8:Release version 3.4.1 of bytecoin core and GUI wallet from 2019/03/07."
"DefaultValue" = "8:#1202"
"UsePlugInResources" = "11:TRUE"
}
Expand Down Expand Up @@ -1971,7 +1971,7 @@
"ContextData" = "8:"
"Attributes" = "3:0"
"Setting" = "3:2"
"Value" = "8:Release version 3.4.0 of bytecoin core and GUI wallet from 2019/02/07."
"Value" = "8:Release version 3.4.1 of bytecoin core and GUI wallet from 2019/03/07."
"DefaultValue" = "8:#1202"
"UsePlugInResources" = "11:TRUE"
}
Expand Down
14 changes: 7 additions & 7 deletions Windows Installer/Installer32.vdproj
Original file line number Diff line number Diff line change
Expand Up @@ -1509,23 +1509,23 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:Bytecoin"
"ProductCode" = "8:{DA38A8D0-775E-44E3-99E3-49E710DC16DF}"
"PackageCode" = "8:{2403EAD2-3C56-444C-818F-C137F08B6276}"
"ProductCode" = "8:{336C0B6E-746C-4E6C-B776-193FC0A89199}"
"PackageCode" = "8:{7DCA49C7-9527-4210-B6A8-1633F81F6BF4}"
"UpgradeCode" = "8:{DC5C7D60-BB08-4B97-B634-E87679CCEB3C}"
"AspNetVersion" = "8:"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
"ProductVersion" = "8:19.2.7"
"ProductVersion" = "8:19.3.7"
"Manufacturer" = "8:Bytecoin Developers"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"
"Title" = "8:32-bit Bytecoin 3.4.0 Installer"
"Title" = "8:32-bit Bytecoin 3.4.1 Installer"
"Subject" = "8:"
"ARPCONTACT" = "8:Bytecoin Developers"
"Keywords" = "8:"
"ARPCOMMENTS" = "8:32-bit release version of bytecoin from 07 Feb 2019"
"ARPCOMMENTS" = "8:32-bit release version of bytecoin from 07 Mar 2019"
"ARPURLINFOABOUT" = "8:https://bytecoin.org"
"ARPPRODUCTICON" = "8:_A84FAE3CB14C4108B5D13DF9AD54E661"
"ARPIconIndex" = "3:0"
Expand Down Expand Up @@ -1732,7 +1732,7 @@
"ContextData" = "8:"
"Attributes" = "3:0"
"Setting" = "3:2"
"Value" = "8:32-bit release version 3.4.0 of bytecoin core and GUI wallet from 2019/02/07."
"Value" = "8:32-bit release version 3.4.1 of bytecoin core and GUI wallet from 2019/03/07."
"DefaultValue" = "8:#1202"
"UsePlugInResources" = "11:TRUE"
}
Expand Down Expand Up @@ -1971,7 +1971,7 @@
"ContextData" = "8:"
"Attributes" = "3:0"
"Setting" = "3:2"
"Value" = "8:32-bit release version 3.4.0 of bytecoin core and GUI wallet from 2019/02/07."
"Value" = "8:32-bit release version 3.4.1 of bytecoin core and GUI wallet from 2019/03/07."
"DefaultValue" = "8:#1202"
"UsePlugInResources" = "11:TRUE"
}
Expand Down
42 changes: 23 additions & 19 deletions src/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ void WalletApplication::openWallet(QWidget* parent)
parent,
tr("Open wallet file"),
QDir::homePath(),
tr("Wallet files (*.wallet);;All files (*)"));
tr("All files (*);;Wallet files (*.wallet)"));
if (fileName.isEmpty())
return;

Expand Down Expand Up @@ -530,26 +530,30 @@ void WalletApplication::requestWalletdAuth(QAuthenticator* authenticator)
}
}

void WalletApplication::createProof(const QString& txHash, bool needToFind)
void WalletApplication::createProof(const QString& txHash, const QStringList& addresses, bool /*needToFind*/)
{
QStringList addresses;
// QStringList addresses;
// if (needToFind)
// {
// QStringList addresses_from_address_book;
// QuestionDialog qdlg{tr("Question"), tr("Cannot find history for the selected transaction.\nDo you want to try to find appropriate addresses in your address book?"), m_mainWindow};
// if (qdlg.exec() != QDialog::Accepted)
// return;
// for (auto i = addressBookManager_->getAddressCount() - 1; i >= 0; --i)
// addresses_from_address_book.append(addressBookManager_->getAddress(i).address);
// addresses = addresses_from_address_book;
// }
// else
// addresses = tx_addresses;

if (needToFind)
{
QuestionDialog qdlg{tr("Question"), tr("Cannot find history for the selected transaction.\nDo you want to try to find appropriate addresses in your address book?"), m_mainWindow};
if (qdlg.exec() != QDialog::Accepted)
return;
for (auto i = addressBookManager_->getAddressCount() - 1; i >= 0; --i)
addresses.append(addressBookManager_->getAddress(i).address);
}
CreateProofDialog dlg{txHash, addresses, m_mainWindow};

CreateProofDialog dlg{txHash, m_mainWindow};

connect(&dlg, &CreateProofDialog::generateProofSignal,
this,
[this, &addresses](const QString& txHash, const QString& message)
[this](const QString& txHash, const QString& address, const QString& message)
{
sendCreateProof(txHash, message, addresses);
sendCreateProof(txHash, message, QStringList{address});
});

connect(walletd_, &RemoteWalletd::proofsReceivedSignal,
Expand All @@ -570,7 +574,7 @@ void WalletApplication::checkProof()
&dlg,
[&dlg](const RpcApi::ProofCheck& check)
{
dlg.showCheckResult(check.validation_error);
dlg.showCheckResult(check);
});
dlg.exec();
}
Expand All @@ -585,14 +589,14 @@ void WalletApplication::showWalletdParams()
dlg.exec();
}

void WalletApplication::exportViewOnlyKeys()
void WalletApplication::exportViewOnlyKeys(bool isAmethyst)
{
emit exportViewOnlyKeysSignal(m_mainWindow, QPrivateSignal{});
emit exportViewOnlyKeysSignal(m_mainWindow, isAmethyst, QPrivateSignal{});
}

void WalletApplication::exportKeys()
void WalletApplication::exportKeys(bool isAmethyst)
{
emit exportKeysSignal(m_mainWindow, QPrivateSignal{});
emit exportKeysSignal(m_mainWindow, isAmethyst, QPrivateSignal{});
}

void WalletApplication::checkForUpdate()
Expand Down
10 changes: 5 additions & 5 deletions src/application.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ class WalletApplication: public QApplication
void builtinRunSignal();
void remoteConnectedSignal();
void createWalletdSignal(QPrivateSignal);
void exportViewOnlyKeysSignal(QWidget* parent/*, const QString& exportPath*/, QPrivateSignal);
void exportKeysSignal(QWidget* parent, QPrivateSignal);
void exportViewOnlyKeysSignal(QWidget* parent, bool isAmethyst/*, const QString& exportPath*/, QPrivateSignal);
void exportKeysSignal(QWidget* parent, bool isAmethyst, QPrivateSignal);
void updateIsReadySignal(const QString& newVersion);

public slots:
void createTx(const RpcApi::CreateTransaction::Request& req);
void sendTx(const RpcApi::SendTransaction::Request& req);
void createProof(const QString& txHash, bool needToFind);
void createProof(const QString& txHash, const QStringList& tx_addresses, bool needToFind);
void sendCreateProof(const QString& txHash, const QString& message, const QStringList& addresses);
void checkProof();
void sendCheckProof(const QString& proof);
Expand All @@ -94,8 +94,8 @@ public slots:

void splashMsg(const QString& msg);

void exportViewOnlyKeys();
void exportKeys();
void exportViewOnlyKeys(bool isAmethyst);
void exportKeys(bool isAmethyst);

private slots:
void connectedToWalletd();
Expand Down
2 changes: 1 addition & 1 deletion src/bytecoin-gui.pro
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ TEMPLATE = app
macx: QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.11
macx: ICON = images/bytecoin.icns
win32: RC_ICONS = images/bytecoin.ico
win32: VERSION = 3.19.2.7
win32: VERSION = 3.19.3.7

#QMAKE_CXXFLAGS += -fno-omit-frame-pointer -fsanitize=address,undefined
#LIBS += -lasan -lubsan
Expand Down
61 changes: 33 additions & 28 deletions src/checkproofdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#include "checkproofdialog.h"
#include "ui_checkproofdialog.h"
#include "rpcapi.h"
#include "common.h"

namespace WalletGUI
Expand Down Expand Up @@ -45,42 +44,48 @@ void CheckProofDialog::proofChanged()

clear();

const QString proofString = ui->proofEdit->toPlainText();
const QByteArray proofBytes = proofString.toLatin1();

QJsonParseError parseError;
QJsonDocument jsonDocument = QJsonDocument::fromJson(proofBytes, &parseError);
if (parseError.error != QJsonParseError::NoError)
{
ui->resultLabel->setText(QString("<b><font color='red'>%1</font></b>").arg(tr("The entered text is not a valid JSON object")));
return;
}

if (!jsonDocument.isObject())
{
ui->resultLabel->setText(QString("<b><font color='red'>%1</font></b>").arg(tr("The entered text is not a valid JSON object")));
return;
}
const QJsonObject json = jsonDocument.object();
const RpcApi::Proof proof = RpcApi::Proof::fromJson(json.toVariantMap());

ui->messageLabel->setText(proof.message);
ui->amountLabel->setText(formatAmount(proof.amount) + " BCN");
ui->addressLabel->setText(proof.address);
ui->txHashLabel->setText(proof.transaction_hash);
// const QString proofString = ui->proofEdit->toPlainText();
// const QByteArray proofBytes = proofString.toLatin1();

// QJsonParseError parseError;
// QJsonDocument jsonDocument = QJsonDocument::fromJson(proofBytes, &parseError);
// if (parseError.error != QJsonParseError::NoError)
// {
// ui->resultLabel->setText(QString("<b><font color='red'>%1</font></b>").arg(tr("The entered text is not a valid JSON object")));
// return;
// }

// if (!jsonDocument.isObject())
// {
// ui->resultLabel->setText(QString("<b><font color='red'>%1</font></b>").arg(tr("The entered text is not a valid JSON object")));
// return;
// }
// const QJsonObject json = jsonDocument.object();
// const RpcApi::Proof proof = RpcApi::Proof::fromJson(json.toVariantMap());

// ui->messageLabel->setText(proof.message);
// ui->amountLabel->setText(formatAmount(proof.amount) + " BCN");
// ui->addressLabel->setText(proof.address);
// ui->txHashLabel->setText(proof.transaction_hash);
}

void CheckProofDialog::checkProof()
{
emit checkProofSignal(ui->proofEdit->toPlainText());
}

void CheckProofDialog::showCheckResult(const QString& result)
void CheckProofDialog::showCheckResult(const RpcApi::ProofCheck& result)
{
if (result.isEmpty())
ui->resultLabel->setText(QString("<b><font color='green'>%1</font></b>").arg(tr("The proof is correct!")));
if (!result.validation_error.isEmpty())
ui->resultLabel->setText(QString("<b><font color='red'>%1</font></b>").arg(result.validation_error));
else
ui->resultLabel->setText(QString("<b><font color='red'>%1</font></b>").arg(result));
{
ui->resultLabel->setText(QString("<b><font color='green'>%1</font></b>").arg(tr("The proof is correct!")));
ui->messageLabel->setText(result.message);
ui->amountLabel->setText(formatAmount(result.amount) + " BCN");
ui->addressLabel->setText(result.address);
ui->txHashLabel->setText(result.transaction_hash);
}
}

}
3 changes: 2 additions & 1 deletion src/checkproofdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#define CHECKPROOFDIALOG_H

#include <QDialog>
#include "rpcapi.h"

namespace Ui {
class CheckProofDialog;
Expand All @@ -22,7 +23,7 @@ class CheckProofDialog : public QDialog
~CheckProofDialog();

public slots:
void showCheckResult(const QString& result);
void showCheckResult(const RpcApi::ProofCheck& result);

signals:
void checkProofSignal(const QString& proof);
Expand Down
Loading

0 comments on commit 89b0094

Please sign in to comment.