Merge pull request #7651

c8ff1d4 monero-wallet-cli: improve error message when tx amount is zero (Elliot Wirrick)
This commit is contained in:
luigi1111 2021-04-22 01:35:20 -04:00
commit 9bba3f4767
No known key found for this signature in database
GPG key ID: F4ACA0183641E010
6 changed files with 30 additions and 8 deletions

View file

@ -608,9 +608,14 @@ void simple_wallet::handle_transfer_exception(const std::exception_ptr &e, bool
fail_msg_writer() << e.what();
warn_of_possible_attack = false;
}
catch (const tools::error::zero_amount&)
{
fail_msg_writer() << sw::tr("destination amount is zero");
warn_of_possible_attack = false;
}
catch (const tools::error::zero_destination&)
{
fail_msg_writer() << sw::tr("one of destinations is zero");
fail_msg_writer() << sw::tr("transaction has no destination");
warn_of_possible_attack = false;
}
catch (const tools::error::tx_too_big& e)