feather/src/dialog/KeysDialog.cpp

26 lines
942 B
C++
Raw Normal View History

// SPDX-License-Identifier: BSD-3-Clause
2023-01-02 19:30:11 +00:00
// SPDX-FileCopyrightText: 2020-2023 The Monero Project
2021-06-27 11:46:32 +00:00
#include "KeysDialog.h"
#include "ui_KeysDialog.h"
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)
{
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());
this->adjustSize();
}
2021-06-27 12:13:05 +00:00
KeysDialog::~KeysDialog() = default;