Skip to content

Commit

Permalink
Make MarketInfo fields optional
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelekol committed Oct 13, 2021
1 parent df529a6 commit 88a6885
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import java.math.BigDecimal

data class MarketInfo(
val fullCoin: FullCoin,
val price: BigDecimal,
val price: BigDecimal?,
val priceChange: BigDecimal?,
val marketCap: BigDecimal,
val marketCap: BigDecimal?,
val totalVolume: BigDecimal?,
) {
constructor(marketInfoRaw: MarketInfoRaw, fullCoin: FullCoin) : this(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ data class MarketInfoRaw(
@SerializedName("coingecko_id")
override val coinGeckoId: String,

val price: BigDecimal,
val price: BigDecimal?,
@SerializedName("price_change_24h")
val priceChange: BigDecimal,
val priceChange: BigDecimal?,
@SerializedName("market_cap")
val marketCap: BigDecimal,
val marketCap: BigDecimal?,
@SerializedName("total_volume")
val totalVolume: BigDecimal?,
) : CoinResponse

0 comments on commit 88a6885

Please sign in to comment.