[skip ci] minor fixes

This commit is contained in:
Serhii 2023-02-27 15:49:53 +02:00
parent ec94c02148
commit 7205725b5c
2 changed files with 4 additions and 4 deletions

View file

@ -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;

View file

@ -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;