From 07625113836f110a01a75a9c79bed84c58544f04 Mon Sep 17 00:00:00 2001 From: AxVultis Date: Mon, 1 Apr 2024 22:29:29 +0200 Subject: [PATCH] Fix ttl parsing --- src/ConcealWallet/TransferCmd.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ConcealWallet/TransferCmd.cpp b/src/ConcealWallet/TransferCmd.cpp index f7ece46e..40f16477 100644 --- a/src/ConcealWallet/TransferCmd.cpp +++ b/src/ConcealWallet/TransferCmd.cpp @@ -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)) { @@ -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";