feather/src/dialog/KeysDialog.cpp

29 lines
932 B
C++
Raw Normal View History

// SPDX-License-Identifier: BSD-3-Clause
2020-12-26 19:56:06 +00:00
// Copyright (c) 2020-2021, 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)
: QDialog(parent)
, 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();
}
KeysDialog::~KeysDialog()
{
delete ui;
}