Skip to content

Commit

Permalink
fix more ktlint
Browse files Browse the repository at this point in the history
  • Loading branch information
nullpointer0x00 committed Oct 25, 2023
1 parent 2d647e6 commit ededff0
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ class ChainAumHourlyRecord(id: EntityID<Int>) : IntEntity(id) {
fun getAumForPeriod(fromDate: DateTime, toDate: DateTime) = transaction {
ChainAumHourlyRecord.find {
(ChainAumHourlyTable.datetime greaterEq fromDate) and
(ChainAumHourlyTable.datetime lessEq toDate.plusDays(1))
(ChainAumHourlyTable.datetime lessEq toDate.plusDays(1))
}
.orderBy(Pair(ChainAumHourlyTable.datetime, SortOrder.ASC))
.toList()
Expand Down Expand Up @@ -301,7 +301,7 @@ class ProcessQueueRecord(id: EntityID<Int>) : IntEntity(id) {
fun findByType(processType: ProcessQueueType) = transaction {
ProcessQueueRecord.find {
(ProcessQueueTable.processType eq processType.name) and
(ProcessQueueTable.processing eq false)
(ProcessQueueTable.processing eq false)
}.toList()
}

Expand All @@ -314,7 +314,7 @@ class ProcessQueueRecord(id: EntityID<Int>) : IntEntity(id) {
fun delete(processType: ProcessQueueType, value: String) = transaction {
ProcessQueueTable.deleteWhere {
(ProcessQueueTable.processType eq processType.name) and
(ProcessQueueTable.processValue eq value)
(processValue eq value)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class TokenService(private val accountClient: AccountGrpcClient) {
AccountRecord.saveAccount(
it.ownerAddress,
PROV_ACC_PREFIX,
accountClient.getAccountInfo(it.ownerAddress),
accountClient.getAccountInfo(it.ownerAddress)
)
}.collect()
TokenDistributionPaginatedResultsRecord.savePaginatedResults(records)
Expand All @@ -95,7 +95,7 @@ class TokenService(private val accountClient: AccountGrpcClient) {
denom: String,
page: Int,
count: Int,
retryCount: Int = 3,
retryCount: Int = 3
): PagedResults<AssetHolder> {
var hasSucceeded = false
var numberOfTriesRemaining = retryCount
Expand Down Expand Up @@ -131,7 +131,7 @@ class TokenService(private val accountClient: AccountGrpcClient) {
Triple(50, 50, "51-100"),
Triple(500, 100, "101-500"),
Triple(500, 500, "501-1000"),
Triple("ALL", 1000, "1001-"),
Triple("ALL", 1000, "1001-")
).map { (limit, offset, range) ->
val results = TokenDistributionPaginatedResultsRecord.findByLimitOffset(richListAccounts(), limit, offset)
val denom = results[0].data.denom
Expand All @@ -153,7 +153,7 @@ class TokenService(private val accountClient: AccountGrpcClient) {
circulatingSupply().toCoinStr(UTILITY_TOKEN),
communityPoolSupply().toCoinStr(UTILITY_TOKEN),
bonded,
burnedSupply().toCoinStr(UTILITY_TOKEN),
burnedSupply().toCoinStr(UTILITY_TOKEN)
)
}

Expand Down Expand Up @@ -216,7 +216,7 @@ class TokenService(private val accountClient: AccountGrpcClient) {
RichAccount(
it.ownerAddress,
CoinStr(it.data.count, it.data.denom),
it.data.count.toPercentage(BigDecimal(100), totalSupply, 4),
it.data.count.toPercentage(BigDecimal(100), totalSupply, 4)
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ import java.time.OffsetDateTime
import java.time.ZoneOffset
import javax.annotation.PostConstruct


@Service
class AsyncService(
private val props: ExplorerProperties,
Expand Down Expand Up @@ -325,17 +324,17 @@ class AsyncService(
time_low = if (low != null) DateTime(low.trade_timestamp * 1000) else k,
quote = mapOf(
USD_UPPER to
CmcQuote(
open = open,
high = high?.price ?: prevPrice,
low = low?.price ?: prevPrice,
close = close,
volume = usdVolume,
market_cap = close.multiply(
tokenService.totalSupply().divide(UTILITY_TOKEN_BASE_MULTIPLIER)
),
timestamp = closeDate
)
CmcQuote(
open = open,
high = high?.price ?: prevPrice,
low = low?.price ?: prevPrice,
close = close,
volume = usdVolume,
market_cap = close.multiply(
tokenService.totalSupply().divide(UTILITY_TOKEN_BASE_MULTIPLIER)
),
timestamp = closeDate
)
)
).also { prevPrice = close }
TokenHistoricalDailyRecord.save(record.time_open.startOfDay(), record)
Expand Down

0 comments on commit ededff0

Please sign in to comment.