Skip to content

Commit bb27f41

Browse files
committed
Fix ConfirmationTime type conversions (UInt, ULong)
1 parent 9315d34 commit bb27f41

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

app/src/main/java/github/aeonbtc/ibiswallet/data/local/ElectrumCache.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -798,8 +798,8 @@ class ElectrumCache(context: Context) : SQLiteOpenHelper(
798798
// Convert WalletTxDetails to TransactionDetails
799799
val confirmationTime = if (details.confirmationHeight > 0) {
800800
ConfirmationTime(
801-
height = details.confirmationHeight.toULong(),
802-
timestamp = details.confirmationTimestamp
801+
height = details.confirmationHeight.toUInt(),
802+
timestamp = details.confirmationTimestamp.toULong()
803803
)
804804
} else null
805805
result[txid] = TransactionDetails(
@@ -841,7 +841,7 @@ class ElectrumCache(context: Context) : SQLiteOpenHelper(
841841
fee = tx.fee?.toLong(),
842842
weight = tx.weight?.toInt(),
843843
confirmationHeight = tx.confirmationTime?.height?.toInt() ?: 0,
844-
confirmationTimestamp = tx.confirmationTime?.timestamp ?: 0,
844+
confirmationTimestamp = tx.confirmationTime?.timestamp?.toLong() ?: 0,
845845
address = tx.address,
846846
addressAmount = tx.addressAmount?.toLong(),
847847
changeAddress = tx.changeAddress,

0 commit comments

Comments
 (0)