mirror of
https://github.com/mempool/mempool.git
synced 2024-11-20 02:11:49 +01:00
fix firstSeen reset bug
This commit is contained in:
parent
6076eeed46
commit
37dd95a4a0
@ -59,8 +59,8 @@ class TransactionUtils {
|
|||||||
feePerVsize: feePerVbytes,
|
feePerVsize: feePerVbytes,
|
||||||
effectiveFeePerVsize: feePerVbytes,
|
effectiveFeePerVsize: feePerVbytes,
|
||||||
}, transaction);
|
}, transaction);
|
||||||
if (!transaction?.status?.confirmed) {
|
if (!transaction?.status?.confirmed && !transactionExtended.firstSeen) {
|
||||||
transactionExtended.firstSeen = Math.round((new Date().getTime() / 1000));
|
transactionExtended.firstSeen = Math.round((Date.now() / 1000));
|
||||||
}
|
}
|
||||||
return transactionExtended;
|
return transactionExtended;
|
||||||
}
|
}
|
||||||
@ -83,8 +83,8 @@ class TransactionUtils {
|
|||||||
adjustedFeePerVsize: adjustedFeePerVsize,
|
adjustedFeePerVsize: adjustedFeePerVsize,
|
||||||
effectiveFeePerVsize: adjustedFeePerVsize,
|
effectiveFeePerVsize: adjustedFeePerVsize,
|
||||||
});
|
});
|
||||||
if (!transaction?.status?.confirmed) {
|
if (!transactionExtended?.status?.confirmed && !transactionExtended.firstSeen) {
|
||||||
transactionExtended.firstSeen = Math.round((new Date().getTime() / 1000));
|
transactionExtended.firstSeen = Math.round((Date.now() / 1000));
|
||||||
}
|
}
|
||||||
return transactionExtended;
|
return transactionExtended;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user