Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix transactions query when searching with fromHash #309

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading