mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
fix: follow-up changes from bitcoin/bitcoin#22220 for maxapsfee
This commit is contained in:
parent
eb4270deae
commit
1707f01309
@ -4694,18 +4694,18 @@ std::shared_ptr<CWallet> CWallet::Create(interfaces::Chain& chain, interfaces::C
|
||||
|
||||
if (gArgs.IsArgSet("-maxapsfee")) {
|
||||
const std::string max_aps_fee{gArgs.GetArg("-maxapsfee", "")};
|
||||
CAmount n = 0;
|
||||
if (max_aps_fee == "-1") {
|
||||
n = -1;
|
||||
} else if (!ParseMoney(max_aps_fee, n)) {
|
||||
walletInstance->m_max_aps_fee = -1;
|
||||
} else if (std::optional<CAmount> max_fee = ParseMoney(max_aps_fee)) {
|
||||
if (max_fee.value() > HIGH_APS_FEE) {
|
||||
warnings.push_back(AmountHighWarn("-maxapsfee") + Untranslated(" ") +
|
||||
_("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 = max_fee.value();
|
||||
} else {
|
||||
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 (in addition to the normal fee) to prioritize partial spend avoidance over regular coin selection."));
|
||||
}
|
||||
walletInstance->m_max_aps_fee = n;
|
||||
}
|
||||
|
||||
if (gArgs.IsArgSet("-fallbackfee")) {
|
||||
|
Loading…
Reference in New Issue
Block a user