2020-10-07 10:36:04 +00:00
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
2023-01-02 19:30:11 +00:00
|
|
|
// SPDX-FileCopyrightText: 2020-2023 The Monero Project
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2021-06-27 11:46:32 +00:00
|
|
|
#include "KeysDialog.h"
|
|
|
|
#include "ui_KeysDialog.h"
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2021-05-18 15:59:18 +00:00
|
|
|
KeysDialog::KeysDialog(QSharedPointer<AppContext> ctx, QWidget *parent)
|
2021-10-22 17:19:56 +00:00
|
|
|
: WindowModalDialog(parent)
|
2021-05-18 15:59:18 +00:00
|
|
|
, 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();
|
|
|
|
}
|
|
|
|
|
2021-06-27 12:13:05 +00:00
|
|
|
KeysDialog::~KeysDialog() = default;
|