diff --git a/src/main/scala/models/binance/Saving.scala b/src/main/scala/models/binance/Saving.scala index 142e7fd..2ef5ce9 100644 --- a/src/main/scala/models/binance/Saving.scala +++ b/src/main/scala/models/binance/Saving.scala @@ -15,7 +15,7 @@ object Saving { case class PositionAmount( asset: String, totalAmount: BigDecimal, - collateralAmount: BigDecimal, + collateralAmount: BigDecimal ) object PositionAmount { given Encoder[PositionAmount] = deriveEncoder[PositionAmount] diff --git a/src/main/scala/services/user/UserService.scala b/src/main/scala/services/user/UserService.scala index 1a5b1c9..a432760 100644 --- a/src/main/scala/services/user/UserService.scala +++ b/src/main/scala/services/user/UserService.scala @@ -155,12 +155,12 @@ class UserServiceImpl(using .find(_.symbol.toLowerCase() == s"${balance.symbol}usdt") .map(_.price) .map(_ * usdtToThb) - .getOrElse{ + .getOrElse { binancePrices - .find(_.symbol.toLowerCase() == s"${balance.symbol}btc") - .map(_.price) - .map(_ * btcToThb) - .getOrElse(BigDecimal(0)) + .find(_.symbol.toLowerCase() == s"${balance.symbol}btc") + .map(_.price) + .map(_ * btcToThb) + .getOrElse(BigDecimal(0)) } } }