Fix overrides AppConfig.configOverrides with DLCOracleAppConfig, also remove hardcoded value out of AppConfig.configOverrides so people have to implement it (#2209)

This commit is contained in:
Chris Stewart 2020-10-21 17:13:09 -05:00 committed by GitHub
parent dc8f4b02be
commit 1bb874db06
2 changed files with 4 additions and 2 deletions

View file

@ -53,7 +53,7 @@ abstract class AppConfig extends StartStopAsync[Unit] with BitcoinSLogger {
/** List of user-provided configs that should /** List of user-provided configs that should
* override defaults * override defaults
*/ */
protected[bitcoins] def configOverrides: List[Config] = List.empty protected[bitcoins] def configOverrides: List[Config]
/** /**
* This method returns a new `AppConfig`, where every * This method returns a new `AppConfig`, where every

View file

@ -17,13 +17,15 @@ import scala.concurrent.{ExecutionContext, Future}
case class DLCOracleAppConfig( case class DLCOracleAppConfig(
private val directory: Path, private val directory: Path,
private val conf: Config*)(implicit val ec: ExecutionContext) private val confs: Config*)(implicit val ec: ExecutionContext)
extends AppConfig extends AppConfig
with DbManagement with DbManagement
with JdbcProfileComponent[DLCOracleAppConfig] { with JdbcProfileComponent[DLCOracleAppConfig] {
import profile.api._ import profile.api._
override def configOverrides: List[Config] = confs.toList
override def appConfig: DLCOracleAppConfig = this override def appConfig: DLCOracleAppConfig = this
override type ConfigType = DLCOracleAppConfig override type ConfigType = DLCOracleAppConfig