Skip to content

Commit

Permalink
Fix transactions query when searching with fromHash
Browse files Browse the repository at this point in the history
  • Loading branch information
abdrasulov committed Apr 2, 2024
1 parent 74af53b commit 6ae449a
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package io.horizontalsystems.ethereumkit.core.storage

import androidx.sqlite.db.SimpleSQLiteQuery
import io.horizontalsystems.ethereumkit.core.ITransactionStorage
import io.horizontalsystems.ethereumkit.core.toRawHexString
import io.horizontalsystems.ethereumkit.models.Address
import io.horizontalsystems.ethereumkit.models.InternalTransaction
import io.horizontalsystems.ethereumkit.models.Transaction
Expand Down Expand Up @@ -43,8 +44,8 @@ class TransactionStorage(database: TransactionDatabase) : ITransactionStorage {
) OR
(
tx.timestamp = ${fromTransaction.timestamp} AND
tx.transactionIndex IS $transactionIndex AND
HEX(tx.hash) < "${fromTransaction.hashString}"
tx.transactionIndex = $transactionIndex AND
HEX(tx.hash) < "${fromTransaction.hash.toRawHexString().uppercase()}"
)
)
"""
Expand Down

0 comments on commit 6ae449a

Please sign in to comment.