Browse Source

server: Move AddressBalance model to rpc package

scalafmt-draft
Alexis Hernandez 7 years ago
parent
commit
bd03d9b902
  1. 1
      server/app/com/xsn/explorer/models/AddressDetails.scala
  2. 2
      server/app/com/xsn/explorer/models/rpc/AddressBalance.scala
  3. 2
      server/app/com/xsn/explorer/services/XSNService.scala
  4. 2
      server/test/com/xsn/explorer/helpers/DummyXSNService.scala
  5. 1
      server/test/controllers/AddressesControllerSpec.scala

1
server/app/com/xsn/explorer/models/AddressDetails.scala

@ -1,5 +1,6 @@
package com.xsn.explorer.models package com.xsn.explorer.models
import com.xsn.explorer.models.rpc.AddressBalance
import play.api.libs.json._ import play.api.libs.json._
case class AddressDetails(balance: AddressBalance, transactionCount: Int) case class AddressDetails(balance: AddressBalance, transactionCount: Int)

2
server/app/com/xsn/explorer/models/AddressBalance.scala → server/app/com/xsn/explorer/models/rpc/AddressBalance.scala

@ -1,4 +1,4 @@
package com.xsn.explorer.models package com.xsn.explorer.models.rpc
import com.xsn.explorer.util.Extensions.BigDecimalExt import com.xsn.explorer.util.Extensions.BigDecimalExt
import play.api.libs.functional.syntax._ import play.api.libs.functional.syntax._

2
server/app/com/xsn/explorer/services/XSNService.scala

@ -8,7 +8,7 @@ import com.xsn.explorer.config.RPCConfig
import com.xsn.explorer.errors._ import com.xsn.explorer.errors._
import com.xsn.explorer.executors.ExternalServiceExecutionContext import com.xsn.explorer.executors.ExternalServiceExecutionContext
import com.xsn.explorer.models._ import com.xsn.explorer.models._
import com.xsn.explorer.models.rpc.{Block, Transaction} import com.xsn.explorer.models.rpc.{AddressBalance, Block, Transaction}
import org.scalactic.{Bad, Good} import org.scalactic.{Bad, Good}
import org.slf4j.LoggerFactory import org.slf4j.LoggerFactory
import play.api.libs.json.{JsNull, JsValue, Reads} import play.api.libs.json.{JsNull, JsValue, Reads}

2
server/test/com/xsn/explorer/helpers/DummyXSNService.scala

@ -2,7 +2,7 @@ package com.xsn.explorer.helpers
import com.alexitc.playsonify.core.FutureApplicationResult import com.alexitc.playsonify.core.FutureApplicationResult
import com.xsn.explorer.models._ import com.xsn.explorer.models._
import com.xsn.explorer.models.rpc.{Block, Transaction} import com.xsn.explorer.models.rpc.{AddressBalance, Block, Transaction}
import com.xsn.explorer.services.XSNService import com.xsn.explorer.services.XSNService
class DummyXSNService extends XSNService { class DummyXSNService extends XSNService {

1
server/test/controllers/AddressesControllerSpec.scala

@ -5,6 +5,7 @@ import com.alexitc.playsonify.core.FutureApplicationResult
import com.xsn.explorer.errors.AddressFormatError import com.xsn.explorer.errors.AddressFormatError
import com.xsn.explorer.helpers.DummyXSNService import com.xsn.explorer.helpers.DummyXSNService
import com.xsn.explorer.models._ import com.xsn.explorer.models._
import com.xsn.explorer.models.rpc.AddressBalance
import com.xsn.explorer.services.XSNService import com.xsn.explorer.services.XSNService
import controllers.common.MyAPISpec import controllers.common.MyAPISpec
import org.scalactic.{One, Or} import org.scalactic.{One, Or}

Loading…
Cancel
Save