From b2d416f211d548b46808988fb19520c0a570b5a8 Mon Sep 17 00:00:00 2001 From: binaryFate Date: Mon, 16 Oct 2017 15:13:23 +0200 Subject: Distinguish "not enough money" and "not enough unlocked money" Fix #1530 --- src/wallet/wallet2.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/wallet/wallet2.cpp') diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index cc0e9e7e2..61979ecf8 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -4441,7 +4441,7 @@ void wallet2::transfer_selected(const std::vector wallet2::create_transactions_2(std::vector balance(), error::not_enough_money, + unlocked_balance(), needed_money, 0); + THROW_WALLET_EXCEPTION_IF(needed_money > unlocked_balance(), error::not_enough_unlocked_money, + unlocked_balance(), needed_money, 0); + // shuffle & sort output indices { std::random_device rd; -- cgit v1.2.3