Skip to content

Commit

Permalink
fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
nullpointer0x00 committed Jan 3, 2025
1 parent fca2f7c commit a8a4c82
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ class TxMessageRecord(id: EntityID<Int>) : IntEntity(id) {

fun findByQueryForResults(txQueryParams: TxQueryParams) = transaction {
val query = findByQueryParams(txQueryParams, listOf(distId) + tableColSet)
.alias("tx_message") //create a subquery (aliased as tx_message) to delay sorting until after the distinct
.alias("tx_message") // create a subquery (aliased as tx_message) to delay sorting until after the distinct
.selectAll()
.orderBy(Pair(TxMessageTable.blockHeight, SortOrder.DESC))
.limit(txQueryParams.count, txQueryParams.offset.toLong())
Expand All @@ -408,7 +408,7 @@ class TxMessageRecord(id: EntityID<Int>) : IntEntity(id) {
}

private fun findByQueryParams(tqp: TxQueryParams, distinctQuery: List<Expression<*>>?) = transaction {
logger().info("Query Params: $tqp");
logger().info("Query Params: $tqp")

var join: ColumnSet = TxMessageTable

Expand Down Expand Up @@ -453,7 +453,6 @@ class TxMessageRecord(id: EntityID<Int>) : IntEntity(id) {
query
}


fun buildInsert(txInfo: TxData, message: Any, msgIdx: Int) = transaction {
listOf(
0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class TransactionService(
ibcSrcPort: String? = null,
ibcSrcChannel: String? = null
): PagedResults<TxSummary> {
logger.info("Fetching transactions with address: $address, denom: $denom, module: $module, msgType: $msgType, txHeight: $txHeight, txStatus: $txStatus, count: $count, page: $page, fromDate: $fromDate, toDate: $toDate, nftAddr: $nftAddr, ibcChain: $ibcChain, ibcSrcPort: $ibcSrcPort, ibcSrcChannel: $ibcSrcChannel");
logger.info("Fetching transactions with address: $address, denom: $denom, module: $module, msgType: $msgType, txHeight: $txHeight, txStatus: $txStatus, count: $count, page: $page, fromDate: $fromDate, toDate: $toDate, nftAddr: $nftAddr, ibcChain: $ibcChain, ibcSrcPort: $ibcSrcPort, ibcSrcChannel: $ibcSrcChannel")
val msgTypes = if (msgType != null) listOf(msgType) else (module?.getValuesPlusAddtnl() ?: listOf())
val msgTypeIds = transaction { TxMessageTypeRecord.findByType(msgTypes).map { it.id.value } }.toList()
val addr = transaction { address?.getAddressType(valService.getActiveSet()) }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package io.provenance.explorer.web.v2

import io.provenance.explorer.model.MsgTypeSet
import io.provenance.explorer.model.TxGov
import io.provenance.explorer.model.TxStatus
import io.provenance.explorer.model.base.PagedResults
import io.provenance.explorer.service.TransactionService
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
Expand Down Expand Up @@ -68,12 +66,12 @@ class TransactionControllerV2(private val transactionService: TransactionService
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
toDate: DateTime?
) = transactionService.getTxsByQuery(
msgType = msgType,
txStatus = txStatus,
count = count,
page = page,
fromDate = fromDate,
toDate = toDate
msgType = msgType,
txStatus = txStatus,
count = count,
page = page,
fromDate = fromDate,
toDate = toDate
)

@ApiOperation("Return transaction detail by hash value")
Expand Down

0 comments on commit a8a4c82

Please sign in to comment.