Skip to content

Commit

Permalink
fix ktlint items
Browse files Browse the repository at this point in the history
  • Loading branch information
nullpointer0x00 committed Oct 25, 2023
1 parent 042c54f commit 2d647e6
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import io.provenance.explorer.domain.extensions.toCoinStr
import io.provenance.explorer.domain.extensions.toOffset
import io.provenance.explorer.domain.extensions.toPercentage
import io.provenance.explorer.domain.models.explorer.DlobHistBase
import io.provenance.explorer.domain.models.explorer.DlobHistorical
import io.provenance.explorer.domain.models.explorer.TokenHistoricalDataRequest
import io.provenance.explorer.grpc.v1.AccountGrpcClient
import io.provenance.explorer.model.AssetHolder
Expand Down Expand Up @@ -70,7 +69,7 @@ class TokenService(private val accountClient: AccountGrpcClient) {
AccountRecord.saveAccount(
it.ownerAddress,
PROV_ACC_PREFIX,
accountClient.getAccountInfo(it.ownerAddress)
accountClient.getAccountInfo(it.ownerAddress),

Check failure on line 72 in service/src/main/kotlin/io/provenance/explorer/service/TokenService.kt

View workflow job for this annotation

GitHub Actions / ktlint

Unnecessary trailing comma before ")"
)
}.collect()
TokenDistributionPaginatedResultsRecord.savePaginatedResults(records)
Expand All @@ -96,7 +95,7 @@ class TokenService(private val accountClient: AccountGrpcClient) {
denom: String,
page: Int,
count: Int,
retryCount: Int = 3
retryCount: Int = 3,

Check failure on line 98 in service/src/main/kotlin/io/provenance/explorer/service/TokenService.kt

View workflow job for this annotation

GitHub Actions / ktlint

Unnecessary trailing comma before ")"
): PagedResults<AssetHolder> {
var hasSucceeded = false
var numberOfTriesRemaining = retryCount
Expand Down Expand Up @@ -132,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-"),

Check failure on line 134 in service/src/main/kotlin/io/provenance/explorer/service/TokenService.kt

View workflow job for this annotation

GitHub Actions / ktlint

Unnecessary trailing comma before ")"
).map { (limit, offset, range) ->
val results = TokenDistributionPaginatedResultsRecord.findByLimitOffset(richListAccounts(), limit, offset)
val denom = results[0].data.denom
Expand All @@ -154,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),

Check failure on line 156 in service/src/main/kotlin/io/provenance/explorer/service/TokenService.kt

View workflow job for this annotation

GitHub Actions / ktlint

Unnecessary trailing comma before ")"
)
}

Expand All @@ -171,8 +170,7 @@ class TokenService(private val accountClient: AccountGrpcClient) {
runBlocking { accountClient.getCommunityPoolAmount(UTILITY_TOKEN).toBigDecimal().roundWhole() }

fun richListAccounts() =
allAccounts().addressList() - zeroSeqAccounts().toSet() - moduleAccounts().addressList() -
contractAccounts().addressList() - setOf(nhashMarkerAddr())
allAccounts().addressList() - zeroSeqAccounts().toSet() - moduleAccounts().addressList() - contractAccounts().addressList() - setOf(nhashMarkerAddr())

fun totalBalanceForList(addresses: Set<String>) = runBlocking {
TokenDistributionPaginatedResultsRecord.findByAddresses(addresses).asFlow()
Expand Down Expand Up @@ -218,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),

Check failure on line 219 in service/src/main/kotlin/io/provenance/explorer/service/TokenService.kt

View workflow job for this annotation

GitHub Actions / ktlint

Unnecessary trailing comma before ")"
)
}
}
Expand Down

0 comments on commit 2d647e6

Please sign in to comment.