Browse Source

server: Move Transaction model to rpc package

scalafmt-draft
Alexis Hernandez 7 years ago
parent
commit
65af722947
  1. 1
      server/app/com/xsn/explorer/models/TransactionDetails.scala
  2. 3
      server/app/com/xsn/explorer/models/rpc/Transaction.scala
  3. 2
      server/app/com/xsn/explorer/services/XSNService.scala
  4. 2
      server/app/com/xsn/explorer/services/logic/BlockLogic.scala
  5. 3
      server/app/com/xsn/explorer/services/logic/TransactionLogic.scala
  6. 2
      server/test/com/xsn/explorer/helpers/DummyXSNService.scala
  7. 2
      server/test/controllers/BlocksControllerSpec.scala
  8. 1
      server/test/controllers/TransactionsControllerSpec.scala

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

@ -1,5 +1,6 @@
package com.xsn.explorer.models
import com.xsn.explorer.models.rpc.Transaction
import play.api.libs.json.{Json, Writes}
case class TransactionDetails(

3
server/app/com/xsn/explorer/models/Transaction.scala → server/app/com/xsn/explorer/models/rpc/Transaction.scala

@ -1,5 +1,6 @@
package com.xsn.explorer.models
package com.xsn.explorer.models.rpc
import com.xsn.explorer.models._
import play.api.libs.functional.syntax._
import play.api.libs.json._

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.executors.ExternalServiceExecutionContext
import com.xsn.explorer.models._
import com.xsn.explorer.models.rpc.Block
import com.xsn.explorer.models.rpc.{Block, Transaction}
import org.scalactic.{Bad, Good}
import org.slf4j.LoggerFactory
import play.api.libs.json.{JsNull, JsValue, Reads}

2
server/app/com/xsn/explorer/services/logic/BlockLogic.scala

@ -3,7 +3,7 @@ package com.xsn.explorer.services.logic
import com.alexitc.playsonify.core.ApplicationResult
import com.xsn.explorer.errors.{BlockNotFoundError, BlockhashFormatError}
import com.xsn.explorer.models._
import com.xsn.explorer.models.rpc.Block
import com.xsn.explorer.models.rpc.{Block, Transaction}
import org.scalactic.{Bad, Good, One, Or}
class BlockLogic {

3
server/app/com/xsn/explorer/services/logic/TransactionLogic.scala

@ -2,7 +2,8 @@ package com.xsn.explorer.services.logic
import com.alexitc.playsonify.core.ApplicationResult
import com.alexitc.playsonify.models.ApplicationError
import com.xsn.explorer.models.{Address, Transaction, TransactionVIN, TransactionVOUT}
import com.xsn.explorer.models.rpc.Transaction
import com.xsn.explorer.models.{Address, TransactionVIN, TransactionVOUT}
import org.scalactic.{One, Or}
class TransactionLogic {

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.xsn.explorer.models._
import com.xsn.explorer.models.rpc.Block
import com.xsn.explorer.models.rpc.{Block, Transaction}
import com.xsn.explorer.services.XSNService
class DummyXSNService extends XSNService {

2
server/test/controllers/BlocksControllerSpec.scala

@ -5,7 +5,7 @@ import com.alexitc.playsonify.core.FutureApplicationResult
import com.xsn.explorer.errors.{BlockNotFoundError, TransactionNotFoundError}
import com.xsn.explorer.helpers.{DataHelper, DummyXSNService}
import com.xsn.explorer.models._
import com.xsn.explorer.models.rpc.Block
import com.xsn.explorer.models.rpc.{Block, Transaction}
import com.xsn.explorer.services.XSNService
import controllers.common.MyAPISpec
import org.scalactic.{Bad, Good}

1
server/test/controllers/TransactionsControllerSpec.scala

@ -5,6 +5,7 @@ import com.alexitc.playsonify.core.FutureApplicationResult
import com.xsn.explorer.errors.TransactionNotFoundError
import com.xsn.explorer.helpers.{DataHelper, DummyXSNService}
import com.xsn.explorer.models._
import com.xsn.explorer.models.rpc.Transaction
import com.xsn.explorer.services.XSNService
import controllers.common.MyAPISpec
import org.scalactic.{Bad, Good}

Loading…
Cancel
Save