From 7205725b5c0d81391361d5cacb5dfedfb654f07d Mon Sep 17 00:00:00 2001 From: Serhii Date: Mon, 27 Feb 2023 15:49:53 +0200 Subject: [PATCH] [skip ci] minor fixes --- cw_haven/lib/haven_transaction_info.dart | 6 +++--- cw_monero/lib/monero_transaction_info.dart | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cw_haven/lib/haven_transaction_info.dart b/cw_haven/lib/haven_transaction_info.dart index 8b7f7c249..90048c605 100644 --- a/cw_haven/lib/haven_transaction_info.dart +++ b/cw_haven/lib/haven_transaction_info.dart @@ -67,11 +67,11 @@ class HavenTransactionInfo extends TransactionInfo { : '~${(unlockTime - height) * 2} minutes'; } try { - var locked = DateTime.fromMicrosecondsSinceEpoch(unlockTime).compareTo(DateTime.now()); + var locked = DateTime.fromMillisecondsSinceEpoch(unlockTime).compareTo(DateTime.now()); final DateFormat formatter = DateFormat('yyyy-MM-dd HH:mm:ss'); final String formattedUnlockTime = - formatter.format(DateTime.fromMicrosecondsSinceEpoch(unlockTime)); - return locked >= 0 ? '$formattedUnlockTime' : null; + formatter.format(DateTime.fromMillisecondsSinceEpoch(unlockTime)); + return locked > 0 ? '$formattedUnlockTime' : null; } catch (e) { print(e); return null; diff --git a/cw_monero/lib/monero_transaction_info.dart b/cw_monero/lib/monero_transaction_info.dart index f2f93c42c..9a828ef21 100644 --- a/cw_monero/lib/monero_transaction_info.dart +++ b/cw_monero/lib/monero_transaction_info.dart @@ -77,7 +77,7 @@ class MoneroTransactionInfo extends TransactionInfo { final DateFormat formatter = DateFormat('yyyy-MM-dd HH:mm:ss'); final String formattedUnlockTime = formatter.format(DateTime.fromMillisecondsSinceEpoch(unlockTime)); - return locked >= 0 ? '$formattedUnlockTime' : null; + return locked > 0 ? '$formattedUnlockTime' : null; } catch (e) { print(e); return null;