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"
|
|
|
|
|
2021-05-18 15:59:18 +00:00
|
|
|
KeysDialog::KeysDialog(QSharedPointer<AppContext> ctx, QWidget *parent)
|
|
|
|
: QDialog(parent)
|
|
|
|
, ui(new Ui::KeysDialog)
|
2020-10-07 10:36:04 +00:00
|
|
|
{
|
|
|
|
ui->setupUi(this);
|
|
|
|
|
2021-05-02 18:22:38 +00:00
|
|
|
QString unavailable = "Unavailable: Key is stored on hardware device";
|
|
|
|
|
2021-05-18 15:59:18 +00:00
|
|
|
ui->label_restoreHeight->setText(QString::number(ctx->wallet->getWalletCreationHeight()));
|
|
|
|
ui->label_primaryAddress->setText(ctx->wallet->address(0, 0));
|
|
|
|
ui->label_secretSpendKey->setText(ctx->wallet->isHwBacked() ? unavailable : ctx->wallet->getSecretSpendKey());
|
|
|
|
ui->label_secretViewKey->setText(ctx->wallet->getSecretViewKey());
|
|
|
|
ui->label_publicSpendKey->setText(ctx->wallet->getPublicSpendKey());
|
|
|
|
ui->label_publicViewKey->setText(ctx->wallet->getPublicViewKey());
|
2020-10-07 10:36:04 +00:00
|
|
|
|
|
|
|
this->adjustSize();
|
|
|
|
}
|
|
|
|
|
|
|
|
KeysDialog::~KeysDialog()
|
|
|
|
{
|
|
|
|
delete ui;
|
|
|
|
}
|