2020-10-07 10:36:04 +00:00
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
2020-12-26 19:56:06 +00:00
|
|
|
// Copyright (c) 2020-2021, The Monero Project.
|
2020-10-07 10:36:04 +00:00
|
|
|
|
|
|
|
#include "keysdialog.h"
|
|
|
|
#include "ui_keysdialog.h"
|
|
|
|
|
|
|
|
KeysDialog::KeysDialog(AppContext *ctx, QWidget *parent)
|
|
|
|
: QDialog(parent)
|
|
|
|
, ui(new Ui::KeysDialog)
|
|
|
|
{
|
|
|
|
ui->setupUi(this);
|
|
|
|
|
2021-05-02 18:22:38 +00:00
|
|
|
auto w = ctx->currentWallet;
|
|
|
|
QString unavailable = "Unavailable: Key is stored on hardware device";
|
|
|
|
|
|
|
|
ui->label_restoreHeight->setText(QString::number(w->getWalletCreationHeight()));
|
|
|
|
ui->label_primaryAddress->setText(w->address(0, 0));
|
|
|
|
ui->label_secretSpendKey->setText(w->isHwBacked() ? unavailable : w->getSecretSpendKey());
|
|
|
|
ui->label_secretViewKey->setText(w->getSecretViewKey());
|
|
|
|
ui->label_publicSpendKey->setText(w->getPublicSpendKey());
|
|
|
|
ui->label_publicViewKey->setText(w->getPublicViewKey());
|
2020-10-07 10:36:04 +00:00
|
|
|
|
|
|
|
this->adjustSize();
|
|
|
|
}
|
|
|
|
|
|
|
|
KeysDialog::~KeysDialog()
|
|
|
|
{
|
|
|
|
delete ui;
|
|
|
|
}
|