From 7e31ea9fa0a59ced2293057acb14c71ec97db689 Mon Sep 17 00:00:00 2001 From: Karl-Johan Alm Date: Mon, 17 Aug 2020 14:38:21 +0900 Subject: -maxapsfee: follow-up fixes Co-authored-by: Jon Atack Co-authored-by: Samuel Dobson --- src/wallet/wallet.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index ac03b3ca9c..c132a4be42 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3890,16 +3890,17 @@ std::shared_ptr CWallet::CreateWalletFromFile(interfaces::Chain& chain, } if (gArgs.IsArgSet("-maxapsfee")) { + const std::string max_aps_fee{gArgs.GetArg("-maxapsfee", "")}; CAmount n = 0; - if (gArgs.GetArg("-maxapsfee", "") == "-1") { + if (max_aps_fee == "-1") { n = -1; - } else if (!ParseMoney(gArgs.GetArg("-maxapsfee", ""), n)) { - error = AmountErrMsg("maxapsfee", gArgs.GetArg("-maxapsfee", "")); + } else if (!ParseMoney(max_aps_fee, n)) { + error = AmountErrMsg("maxapsfee", max_aps_fee); return nullptr; } if (n > HIGH_APS_FEE) { warnings.push_back(AmountHighWarn("-maxapsfee") + Untranslated(" ") + - _("This is the maximum transaction fee you pay to prioritize partial spend avoidance over regular coin selection.")); + _("This is the maximum transaction fee you pay (in addition to the normal fee) to prioritize partial spend avoidance over regular coin selection.")); } walletInstance->m_max_aps_fee = n; } -- cgit v1.2.3