Skip to content

Commit

Permalink
Fix ttl parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
AxVultis committed Apr 1, 2024
1 parent 08b7454 commit 0762511
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/ConcealWallet/TransferCmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ namespace cn
if (arg.size() && arg[0] == '-')
{
const auto& value = ar.next();
bool ttl_to_str = common::fromString(value, ttl) || ttl < 1 || ttl * 60 > m_currency.mempoolTxLiveTime();

if (arg == "-p" && !createTxExtraWithPaymentId(value, extra))
{
Expand All @@ -47,7 +46,7 @@ namespace cn
{
messages.emplace_back(value);
}
else if (arg == "-ttl" && !ttl_to_str)
else if (arg == "-ttl" && !(common::fromString(value, ttl) || ttl < 1 || ttl * 60 > m_currency.mempoolTxLiveTime()))
{
logger(ERROR, BRIGHT_RED) << "TTL has invalid format: \"" << value << "\", " <<
"enter time from 1 to " << (m_currency.mempoolTxLiveTime() / 60) << " minutes";
Expand Down

0 comments on commit 0762511

Please sign in to comment.