Skip to content

Commit

Permalink
Merge pull request #491 from zcoinofficial/remint-unlock
Browse files Browse the repository at this point in the history
Add unlock prompt to Remint page
  • Loading branch information
riordant authored Jul 5, 2019
2 parents f72f454 + 372e432 commit 27a1eec
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/qt/walletview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ void WalletView::setWalletModel(WalletModel *walletModel)
znodeListPage->setWalletModel(walletModel);
sendZcoinView->setModel(walletModel);
exoAssetsPage->setWalletModel(walletModel);
zc2SigmaPage->setWalletModel(walletModel);

if (exodusTransactionsView) {
exodusTransactionsView->setWalletModel(walletModel);
Expand Down
10 changes: 10 additions & 0 deletions src/qt/zc2sigmapage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "zc2sigmamodel.h"
#include "znode-sync.h"
#include "clientmodel.h"
#include "walletmodel.h"

#include "../wallet/wallet.h"
#include "main.h"
Expand Down Expand Up @@ -90,7 +91,16 @@ void Zc2SigmaPage::setClientModel(ClientModel *clientModel_) {
clientModel = clientModel_;
}

void Zc2SigmaPage::setWalletModel(WalletModel *walletModel_) {
walletModel = walletModel_;
}

void Zc2SigmaPage::on_remintButton_clicked() {

WalletModel::UnlockContext ctx(walletModel->requestUnlock());
if (!ctx.isValid()) {
return;
}
QItemSelectionModel * select = ui->availMintsTable->selectionModel();

if(!select->hasSelection())
Expand Down
3 changes: 3 additions & 0 deletions src/qt/zc2sigmapage.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class OptionsModel;
class PlatformStyle;
class Zc2SigmaModel;
class ClientModel;
class WalletModel;

namespace Ui {
class Zc2SigmaPage;
Expand All @@ -35,13 +36,15 @@ class Zc2SigmaPage : public QWidget
~Zc2SigmaPage();
void createModel();
void setClientModel(ClientModel *clientModel_);
void setWalletModel(WalletModel *walletModel_);

static bool showZc2SigmaPage();

private:
Ui::Zc2SigmaPage *ui;
std::shared_ptr<Zc2SigmaModel> model;
ClientModel *clientModel;
WalletModel *walletModel;

protected:
void showEvent(QShowEvent* event);
Expand Down

0 comments on commit 27a1eec

Please sign in to comment.