Browse Source

Fixed #2007

cl-refactor
Gav Wood 10 years ago
parent
commit
3fcbab1423
  1. 11
      alethzero/MainWin.cpp

11
alethzero/MainWin.cpp

@ -2048,12 +2048,11 @@ void Main::on_killAccount_triggered()
auto hba = ui->ourAccounts->currentItem()->data(Qt::UserRole).toByteArray(); auto hba = ui->ourAccounts->currentItem()->data(Qt::UserRole).toByteArray();
Address h((byte const*)hba.data(), Address::ConstructFromPointer); Address h((byte const*)hba.data(), Address::ConstructFromPointer);
auto k = m_keyManager.accountDetails()[h]; auto k = m_keyManager.accountDetails()[h];
if ( QString s = QInputDialog::getText(this, QString::fromStdString("Kill Account " + k.first + "?!"),
ethereum()->balanceAt(h) != 0 && QString::fromStdString("Account " + k.first + " (" + render(h) + ") has " + formatBalance(ethereum()->balanceAt(h)) + " in it.\r\nIt, and any contract that this account can access, will be lost forever if you continue. Do NOT continue unless you know what you are doing.\n"
QMessageBox::critical(this, QString::fromStdString("Kill Account " + k.first + "?!"), "Are you sure you want to continue? \r\n If so, type 'YES' to confirm."),
QString::fromStdString("Account " + k.first + " (" + render(h) + ") has " + formatBalance(ethereum()->balanceAt(h)) + " in it. It, and any contract that this account can access, will be lost forever if you continue. Do NOT continue unless you know what you are doing.\n" QLineEdit::Normal, "NO");
"Are you sure you want to continue?"), if (s != "YES")
QMessageBox::Yes, QMessageBox::No) == QMessageBox::No)
return; return;
m_keyManager.kill(h); m_keyManager.kill(h);
if (m_keyManager.accounts().empty()) if (m_keyManager.accounts().empty())

Loading…
Cancel
Save