Skip to content

Commit

Permalink
Slight code cleanup and reformatting
Browse files Browse the repository at this point in the history
  • Loading branch information
aneonex committed Sep 5, 2021
1 parent ae9c0bb commit e13b432
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,5 @@ object MarketsConfig {
Phemex(),
)

@kotlin.jvm.JvmField
val MARKETS: Map<String, Market> = registeredMarkets.map{it.key to it}.toMap()
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package com.aneonex.bitcoinchecker.datamodule.model

class CurrencyPairsListWithDate {
@kotlin.jvm.JvmField
var date: Long = 0
@kotlin.jvm.JvmField
class CurrencyPairsListWithDate(
var date: Long = 0,
var pairs: List<CurrencyPairInfo>? = null
}
)
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
package com.aneonex.bitcoinchecker.datamodule.model

class CurrencySubunit @JvmOverloads constructor(val name: String, val subunitToUnit: Long, val allowDecimal: Boolean = true)
class CurrencySubunit(
val name: String,
val subunitToUnit: Long,
val allowDecimal: Boolean = true
)
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ object Futures {
"6M"
)

@kotlin.jvm.JvmStatic
fun getContractTypeShortName(contractType: Int): String? {
return if (contractType >= 0 && contractType < CONTRACT_TYPE_SHORT_NAMES.size) {
CONTRACT_TYPE_SHORT_NAMES[contractType]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ import com.aneonex.bitcoinchecker.datamodule.util.TimeUtils
import org.json.JSONObject

abstract class Market(
@kotlin.jvm.JvmField val name: String,
@kotlin.jvm.JvmField val ttsName: String,
@kotlin.jvm.JvmField val currencyPairs: CurrencyPairsMap?
) {
val name: String,
val ttsName: String,
val currencyPairs: CurrencyPairsMap?
) {

@kotlin.jvm.JvmField
val key: String = this.javaClass.simpleName

open val cautionResId: Int
Expand Down
Original file line number Diff line number Diff line change
@@ -1,31 +1,16 @@
package com.aneonex.bitcoinchecker.datamodule.model

class Ticker {
companion object {
const val NO_DATA = -1
}

@kotlin.jvm.JvmField
var bid: Double = NO_DATA.toDouble()

@kotlin.jvm.JvmField
var ask: Double = NO_DATA.toDouble()

@kotlin.jvm.JvmField
var vol: Double = NO_DATA.toDouble()

@kotlin.jvm.JvmField
var volQuote: Double = NO_DATA.toDouble()

@kotlin.jvm.JvmField
var high: Double = NO_DATA.toDouble()

@kotlin.jvm.JvmField
var low: Double = NO_DATA.toDouble()

@kotlin.jvm.JvmField
var last: Double = NO_DATA.toDouble()

@kotlin.jvm.JvmField
var timestamp: Long = NO_DATA.toLong()

companion object {
const val NO_DATA = -1
}
}

0 comments on commit e13b432

Please sign in to comment.