[ #1099] Proper transaction state
This commit is contained in:
parent
dc330228ff
commit
89ee0190af
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue