mirror of
https://github.com/eosswedenorg/antelope-keygen
synced 2026-06-17 03:50:03 +02:00
gui/src/GenerateWindow.cpp: Check Settings::shouldGenerateFioKeys() if we should use "FIO" or "EOS" prefix.
This commit is contained in:
parent
8c9047d716
commit
6bd84b1d8d
1 changed files with 4 additions and 2 deletions
|
|
@ -28,6 +28,7 @@
|
|||
#include <QGuiApplication>
|
||||
#include <libeosio/ec.hpp>
|
||||
#include <libeosio/WIF.hpp>
|
||||
#include "Settings.hpp"
|
||||
#include "GenerateWindow.hpp"
|
||||
|
||||
void _initKeyWidget(QLineEdit& w) {
|
||||
|
|
@ -91,12 +92,13 @@ m_btn_copy_both ("Copy keys")
|
|||
|
||||
void GenerateWindow::generate_key()
|
||||
{
|
||||
std::string pubstr, privstr;
|
||||
std::string pubstr;
|
||||
struct libeosio::ec_keypair pair;
|
||||
|
||||
libeosio::ec_generate_key(&pair);
|
||||
|
||||
m_pub.setText(QString::fromStdString(libeosio::wif_pub_encode(pair.pub)));
|
||||
pubstr = libeosio::wif_pub_encode(pair.pub, Settings::shouldGenerateFioKeys() ? "FIO" : "EOS");
|
||||
m_pub.setText(QString::fromStdString(pubstr));
|
||||
m_priv.setText(QString::fromStdString(libeosio::wif_priv_encode(pair.secret)));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue