aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorstoffu <stoffu@protonmail.ch>2017-11-06 10:15:38 +0900
committerstoffu <stoffu@protonmail.ch>2017-11-06 10:15:38 +0900
commit37c3792b00ed7e3af0380dddd9fea2e01bebd5e6 (patch)
tree8f587b9914d7cde07e978224d2df53d62078e90e /src/wallet
parentMerge pull request #2605 (diff)
downloadmonero-37c3792b00ed7e3af0380dddd9fea2e01bebd5e6.tar.xz
wallet2 bugfix: supply missing subaddr_account arg to balance() and unlocked balance()
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallet2.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index f0eaf2331..a87803206 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -5479,10 +5479,10 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
// we could also check for being within FEE_PER_KB, but if the fee calculation
// ever changes, this might be missed, so let this go through
// first check overall balance is enough, then unlocked one, so we throw distinct exceptions
- THROW_WALLET_EXCEPTION_IF(needed_money > 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);
+ THROW_WALLET_EXCEPTION_IF(needed_money > balance(subaddr_account), error::not_enough_money,
+ unlocked_balance(subaddr_account), needed_money, 0);
+ THROW_WALLET_EXCEPTION_IF(needed_money > unlocked_balance(subaddr_account), error::not_enough_unlocked_money,
+ unlocked_balance(subaddr_account), needed_money, 0);
// shuffle & sort output indices
{