From 636c2b509e7d03d8d09905821edf305a9ce3a6fe Mon Sep 17 00:00:00 2001 From: Alexis Hernandez Date: Sat, 24 Mar 2018 17:12:57 -0600 Subject: [PATCH] server: Move TransactionVOUT to rpc package --- server/app/com/xsn/explorer/models/TransactionValue.scala | 1 + .../com/xsn/explorer/models/{ => rpc}/TransactionVOUT.scala | 4 ++-- .../com/xsn/explorer/services/logic/TransactionLogic.scala | 4 ++-- server/test/com/xsn/explorer/helpers/DataHelper.scala | 4 ++-- server/test/controllers/BlocksControllerSpec.scala | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) rename server/app/com/xsn/explorer/models/{ => rpc}/TransactionVOUT.scala (87%) diff --git a/server/app/com/xsn/explorer/models/TransactionValue.scala b/server/app/com/xsn/explorer/models/TransactionValue.scala index 7495505..5b899b9 100644 --- a/server/app/com/xsn/explorer/models/TransactionValue.scala +++ b/server/app/com/xsn/explorer/models/TransactionValue.scala @@ -1,5 +1,6 @@ package com.xsn.explorer.models +import com.xsn.explorer.models.rpc.TransactionVOUT import play.api.libs.json.{Json, Writes} case class TransactionValue(address: Address, value: BigDecimal) diff --git a/server/app/com/xsn/explorer/models/TransactionVOUT.scala b/server/app/com/xsn/explorer/models/rpc/TransactionVOUT.scala similarity index 87% rename from server/app/com/xsn/explorer/models/TransactionVOUT.scala rename to server/app/com/xsn/explorer/models/rpc/TransactionVOUT.scala index 1de8850..b6aa095 100644 --- a/server/app/com/xsn/explorer/models/TransactionVOUT.scala +++ b/server/app/com/xsn/explorer/models/rpc/TransactionVOUT.scala @@ -1,6 +1,6 @@ -package com.xsn.explorer.models +package com.xsn.explorer.models.rpc -import com.xsn.explorer.models.rpc.ScriptPubKey +import com.xsn.explorer.models.Address import play.api.libs.functional.syntax._ import play.api.libs.json.{Reads, __} diff --git a/server/app/com/xsn/explorer/services/logic/TransactionLogic.scala b/server/app/com/xsn/explorer/services/logic/TransactionLogic.scala index 30d7187..81fa726 100644 --- a/server/app/com/xsn/explorer/services/logic/TransactionLogic.scala +++ b/server/app/com/xsn/explorer/services/logic/TransactionLogic.scala @@ -2,8 +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.rpc.{Transaction, TransactionVIN} -import com.xsn.explorer.models.{Address, TransactionVOUT} +import com.xsn.explorer.models.Address +import com.xsn.explorer.models.rpc.{Transaction, TransactionVIN, TransactionVOUT} import org.scalactic.{One, Or} class TransactionLogic { diff --git a/server/test/com/xsn/explorer/helpers/DataHelper.scala b/server/test/com/xsn/explorer/helpers/DataHelper.scala index 02e652a..f8824ec 100644 --- a/server/test/com/xsn/explorer/helpers/DataHelper.scala +++ b/server/test/com/xsn/explorer/helpers/DataHelper.scala @@ -1,7 +1,7 @@ package com.xsn.explorer.helpers -import com.xsn.explorer.models.rpc.ScriptPubKey -import com.xsn.explorer.models.{Address, TransactionId, TransactionVOUT} +import com.xsn.explorer.models.rpc.{ScriptPubKey, TransactionVOUT} +import com.xsn.explorer.models.{Address, TransactionId} object DataHelper { diff --git a/server/test/controllers/BlocksControllerSpec.scala b/server/test/controllers/BlocksControllerSpec.scala index edb74cf..be338d1 100644 --- a/server/test/controllers/BlocksControllerSpec.scala +++ b/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, Transaction, TransactionVIN} +import com.xsn.explorer.models.rpc.{Block, Transaction, TransactionVIN, TransactionVOUT} import com.xsn.explorer.services.XSNService import controllers.common.MyAPISpec import org.scalactic.{Bad, Good}