Skip to content
This repository has been archived by the owner on Jan 29, 2019. It is now read-only.

Commit

Permalink
Fix Search API. Make ethereum hashes case insensitive. Remove hash pr…
Browse files Browse the repository at this point in the history
…efix on search.
  • Loading branch information
arturalbov committed Jul 31, 2018
1 parent 667759e commit 657f1a0
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import fund.cyber.cassandra.ethereum.repository.PageableEthereumContractMinedBlo
import fund.cyber.cassandra.ethereum.repository.PageableEthereumContractMinedUncleRepository
import fund.cyber.cassandra.ethereum.repository.PageableEthereumContractTxRepository
import fund.cyber.common.toSearchEthereumHashFormat
import fund.cyber.common.toSearchHashFormat
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.context.annotation.DependsOn
Expand All @@ -27,7 +26,7 @@ class EthereumContractHandlersConfiguration {
EthereumContractTxRepository::class.java
) { request, conractRepository, contractTxRepository ->

val contractId = request.pathVariable("hash").toSearchHashFormat().toLowerCase()
val contractId = request.pathVariable("hash").toSearchEthereumHashFormat()

val contract = conractRepository.findById(contractId)
val contractUnconfirmedTxes = contractTxRepository.findAllByContractHashAndBlockTime(contractId, -1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import fund.cyber.api.common.SingleRepositoryItemRequestHandler
import fund.cyber.api.common.asServerResponse
import fund.cyber.cassandra.ethereum.repository.EthereumTxRepository
import fund.cyber.common.toSearchEthereumHashFormat
import fund.cyber.common.toSearchHashFormat
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.context.annotation.DependsOn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import fund.cyber.api.common.SingleRepositoryItemRequestHandler
import fund.cyber.api.common.asServerResponse
import fund.cyber.cassandra.ethereum.repository.EthereumUncleRepository
import fund.cyber.common.toSearchEthereumHashFormat
import fund.cyber.common.toSearchHashFormat
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.context.annotation.DependsOn
Expand Down

0 comments on commit 657f1a0

Please sign in to comment.