mirror of
https://github.com/AskDavis/Casinotest.git
synced 2026-01-02 20:09:47 -08:00
Version 1.1.0.0 update
This commit is contained in:
@@ -10,11 +10,11 @@
|
||||
#include "walletmodel.h"
|
||||
#include "wallet.h"
|
||||
|
||||
#include <QClipboard>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <QClipboard>
|
||||
|
||||
SignVerifyMessageDialog::SignVerifyMessageDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::SignVerifyMessageDialog),
|
||||
@@ -24,11 +24,11 @@ SignVerifyMessageDialog::SignVerifyMessageDialog(QWidget *parent) :
|
||||
|
||||
#if (QT_VERSION >= 0x040700)
|
||||
/* Do not move this to the XML file, Qt before 4.7 will choke on it */
|
||||
ui->addressIn_SM->setPlaceholderText(tr("Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)"));
|
||||
ui->addressIn_SM->setPlaceholderText(tr("Enter a CasinoCoin address (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)"));
|
||||
ui->signatureOut_SM->setPlaceholderText(tr("Click \"Sign Message\" to generate signature"));
|
||||
|
||||
ui->addressIn_VM->setPlaceholderText(tr("Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)"));
|
||||
ui->signatureIn_VM->setPlaceholderText(tr("Enter Bitcoin signature"));
|
||||
ui->addressIn_VM->setPlaceholderText(tr("Enter a CasinoCoin address (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)"));
|
||||
ui->signatureIn_VM->setPlaceholderText(tr("Enter CasinoCoin signature"));
|
||||
#endif
|
||||
|
||||
GUIUtil::setupAddressWidget(ui->addressIn_SM, this);
|
||||
@@ -55,13 +55,13 @@ void SignVerifyMessageDialog::setModel(WalletModel *model)
|
||||
this->model = model;
|
||||
}
|
||||
|
||||
void SignVerifyMessageDialog::setAddress_SM(QString address)
|
||||
void SignVerifyMessageDialog::setAddress_SM(const QString &address)
|
||||
{
|
||||
ui->addressIn_SM->setText(address);
|
||||
ui->messageIn_SM->setFocus();
|
||||
}
|
||||
|
||||
void SignVerifyMessageDialog::setAddress_VM(QString address)
|
||||
void SignVerifyMessageDialog::setAddress_VM(const QString &address)
|
||||
{
|
||||
ui->addressIn_VM->setText(address);
|
||||
ui->messageIn_VM->setFocus();
|
||||
@@ -126,7 +126,7 @@ void SignVerifyMessageDialog::on_signMessageButton_SM_clicked()
|
||||
if (!ctx.isValid())
|
||||
{
|
||||
ui->statusLabel_SM->setStyleSheet("QLabel { color: red; }");
|
||||
ui->statusLabel_SM->setText(tr("Wallet unlock was canceled."));
|
||||
ui->statusLabel_SM->setText(tr("Wallet unlock was cancelled."));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -218,8 +218,8 @@ void SignVerifyMessageDialog::on_verifyMessageButton_VM_clicked()
|
||||
ss << strMessageMagic;
|
||||
ss << ui->messageIn_VM->document()->toPlainText().toStdString();
|
||||
|
||||
CKey key;
|
||||
if (!key.SetCompactSignature(Hash(ss.begin(), ss.end()), vchSig))
|
||||
CPubKey pubkey;
|
||||
if (!pubkey.RecoverCompact(Hash(ss.begin(), ss.end()), vchSig))
|
||||
{
|
||||
ui->signatureIn_VM->setValid(false);
|
||||
ui->statusLabel_VM->setStyleSheet("QLabel { color: red; }");
|
||||
@@ -227,7 +227,7 @@ void SignVerifyMessageDialog::on_verifyMessageButton_VM_clicked()
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(CBitcoinAddress(key.GetPubKey().GetID()) == addr))
|
||||
if (!(CBitcoinAddress(pubkey.GetID()) == addr))
|
||||
{
|
||||
ui->statusLabel_VM->setStyleSheet("QLabel { color: red; }");
|
||||
ui->statusLabel_VM->setText(QString("<nobr>") + tr("Message verification failed.") + QString("</nobr>"));
|
||||
|
||||
Reference in New Issue
Block a user