KeyPairk=KeyPair::fromEncryptedSeed(&encseed,QInputDialog::getText(this,"Enter Password","Enter the wallet's passphrase",QLineEdit::Password).toStdString());
KeyPairk;
if(obj["ethaddr"].type()==js::str_type)
for(boolgotit=false;!gotit;)
{
{
Addressa(obj["ethaddr"].get_str());
gotit=true;
Addressb=k.address();
k=KeyPair::fromEncryptedSeed(&encseed,QInputDialog::getText(this,"Enter Password","Enter the wallet's passphrase",QLineEdit::Password).toStdString());
if(a!=b&&QMessageBox::warning(this,"Key File Invalid","Could not import the secret key: it doesn't agree with the given address.\nWould you like to attempt to import anyway?",QMessageBox::Yes|QMessageBox::No)==QMessageBox::No)
if(obj["ethaddr"].type()==js::str_type)
return;
{
Addressa(obj["ethaddr"].get_str());
Addressb=k.address();
if(a!=b)
{
if(QMessageBox::warning(this,"Password Wrong","Could not import the secret key: the password you gave appears to be wrong.",QMessageBox::Retry,QMessageBox::Cancel)==QMessageBox::Cancel)