mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-09 12:29:31 +00:00
[skip ci] minor fixes
This commit is contained in:
parent
ec94c02148
commit
7205725b5c
2 changed files with 4 additions and 4 deletions
|
@ -67,11 +67,11 @@ class HavenTransactionInfo extends TransactionInfo {
|
||||||
: '~${(unlockTime - height) * 2} minutes';
|
: '~${(unlockTime - height) * 2} minutes';
|
||||||
}
|
}
|
||||||
try {
|
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 DateFormat formatter = DateFormat('yyyy-MM-dd HH:mm:ss');
|
||||||
final String formattedUnlockTime =
|
final String formattedUnlockTime =
|
||||||
formatter.format(DateTime.fromMicrosecondsSinceEpoch(unlockTime));
|
formatter.format(DateTime.fromMillisecondsSinceEpoch(unlockTime));
|
||||||
return locked >= 0 ? '$formattedUnlockTime' : null;
|
return locked > 0 ? '$formattedUnlockTime' : null;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print(e);
|
print(e);
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -77,7 +77,7 @@ class MoneroTransactionInfo extends TransactionInfo {
|
||||||
final DateFormat formatter = DateFormat('yyyy-MM-dd HH:mm:ss');
|
final DateFormat formatter = DateFormat('yyyy-MM-dd HH:mm:ss');
|
||||||
final String formattedUnlockTime =
|
final String formattedUnlockTime =
|
||||||
formatter.format(DateTime.fromMillisecondsSinceEpoch(unlockTime));
|
formatter.format(DateTime.fromMillisecondsSinceEpoch(unlockTime));
|
||||||
return locked >= 0 ? '$formattedUnlockTime' : null;
|
return locked > 0 ? '$formattedUnlockTime' : null;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print(e);
|
print(e);
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in a new issue