-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
60 changed files
with
231 additions
and
214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
server/app/com/xsn/explorer/data/anorm/BalancePostgresDataHandler.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
server/app/com/xsn/explorer/data/anorm/BlockPostgresDataHandler.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
server/app/com/xsn/explorer/data/anorm/TransactionPostgresDataHandler.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
server/app/com/xsn/explorer/data/anorm/dao/BalancePostgresDAO.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
server/app/com/xsn/explorer/data/anorm/dao/BlockPostgresDAO.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 0 additions & 19 deletions
19
server/app/com/xsn/explorer/data/anorm/interpreters/ColumnNameResolver.scala
This file was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
server/app/com/xsn/explorer/data/anorm/interpreters/FieldOrderingSQLInterpreter.scala
This file was deleted.
Oops, something went wrong.
6 changes: 3 additions & 3 deletions
6
server/app/com/xsn/explorer/data/async/BalanceFutureDataHandler.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
package com.xsn.explorer.errors | ||
|
||
import com.alexitc.playsonify.models.{PublicError, ServerError} | ||
import play.api.i18n.{Lang, MessagesApi} | ||
import com.alexitc.playsonify.core.I18nService | ||
import com.alexitc.playsonify.models.{ErrorId, PublicError, ServerError} | ||
|
||
sealed trait BalanceError | ||
|
||
case object BalanceUnknownError extends BalanceError with ServerError { | ||
|
||
val id = ErrorId.create | ||
|
||
override def cause: Option[Throwable] = None | ||
|
||
override def toPublicErrorList(messagesApi: MessagesApi)(implicit lang: Lang): List[PublicError] = List.empty | ||
override def toPublicErrorList[L](i18nService: I18nService[L])(implicit lang: L): List[PublicError] = List.empty | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,30 @@ | ||
package com.xsn.explorer.errors | ||
|
||
import com.alexitc.playsonify.models.{FieldValidationError, InputValidationError, PublicError, ServerError} | ||
import play.api.i18n.{Lang, MessagesApi} | ||
import com.alexitc.playsonify.core.I18nService | ||
import com.alexitc.playsonify.models._ | ||
|
||
sealed trait BlockError | ||
|
||
case object BlockhashFormatError extends BlockError with InputValidationError { | ||
|
||
override def toPublicErrorList(messagesApi: MessagesApi)(implicit lang: Lang): List[PublicError] = { | ||
val message = messagesApi("error.block.format") | ||
override def toPublicErrorList[L](i18nService: I18nService[L])(implicit lang: L): List[PublicError] = { | ||
val message = i18nService.render("error.block.format") | ||
val error = FieldValidationError("blockhash", message) | ||
List(error) | ||
} | ||
} | ||
|
||
case object BlockNotFoundError extends BlockError with InputValidationError { | ||
|
||
override def toPublicErrorList(messagesApi: MessagesApi)(implicit lang: Lang): List[PublicError] = { | ||
val message = messagesApi("error.block.notFound") | ||
override def toPublicErrorList[L](i18nService: I18nService[L])(implicit lang: L): List[PublicError] = { | ||
val message = i18nService.render("error.block.notFound") | ||
val error = FieldValidationError("blockhash", message) | ||
List(error) | ||
} | ||
} | ||
|
||
case object BlockUnknownError extends BlockError with ServerError { | ||
val id = ErrorId.create | ||
override def cause: Option[Throwable] = None | ||
override def toPublicErrorList(messagesApi: MessagesApi)(implicit lang: Lang): List[PublicError] = List.empty | ||
override def toPublicErrorList[L](i18nService: I18nService[L])(implicit lang: L): List[PublicError] = List.empty | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.