Skip to content

Commit

Permalink
[ #1099] Proper transaction state
Browse files Browse the repository at this point in the history
  • Loading branch information
HonzaR authored Jul 5, 2023
1 parent dc33022 commit 89ee019
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,10 @@ enum class TransactionState {
minedHeight: BlockHeight?,
expiryHeight: BlockHeight?
): TransactionState {
return if (minedHeight != null && (latestBlockHeight.value - minedHeight.value) > MIN_CONFIRMATIONS) {
return if (minedHeight != null && (latestBlockHeight.value - minedHeight.value) >= MIN_CONFIRMATIONS) {
Confirmed
} else if (minedHeight != null && (latestBlockHeight.value - minedHeight.value) < MIN_CONFIRMATIONS) {
Pending
} else if (minedHeight == null && ((expiryHeight?.value ?: Long.MAX_VALUE) < latestBlockHeight.value)) {
Pending
} else {
Expand Down

0 comments on commit 89ee019

Please sign in to comment.