From 39c230e5d1f319ea1b4498e36eb71e8cec175c10 Mon Sep 17 00:00:00 2001 From: MS Date: Thu, 25 May 2023 15:42:29 +0200 Subject: Fixing /config response. Using the Libtool "CURRENT:revision:AGE" version format. All the versions are however set to 0:0:0 now. --- sandbox/src/main/kotlin/tech/libeufin/sandbox/CircuitApi.kt | 4 +--- sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'sandbox/src/main/kotlin/tech/libeufin') diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/CircuitApi.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/CircuitApi.kt index 0ed53185..ef44e09c 100644 --- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/CircuitApi.kt +++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/CircuitApi.kt @@ -7,14 +7,12 @@ import io.ktor.server.request.* import io.ktor.server.response.* import io.ktor.server.routing.* import org.jetbrains.exposed.sql.* -import org.jetbrains.exposed.sql.SqlExpressionBuilder.like import org.jetbrains.exposed.sql.transactions.transaction import tech.libeufin.sandbox.CashoutOperationsTable.uuid import tech.libeufin.util.* import java.io.File import java.io.InputStreamReader import java.math.BigDecimal -import java.math.MathContext import java.math.RoundingMode import java.util.concurrent.TimeUnit import kotlin.text.toByteArray @@ -50,7 +48,7 @@ const val FIAT_CURRENCY = "CHF" // FIXME: make configurable. // Configuration response: data class ConfigResp( val name: String = "circuit", - val version: String = SANDBOX_VERSION, + val version: String = PROTOCOL_VERSION_UNIFIED, val ratios_and_fees: RatioAndFees, val fiat_currency: String = FIAT_CURRENCY ) diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt index aea5a008..dfb20ffc 100644 --- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt +++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt @@ -47,7 +47,6 @@ import io.ktor.server.util.* import io.ktor.server.plugins.callloging.* import io.ktor.server.plugins.cors.routing.* import io.ktor.util.date.* -import org.jetbrains.exposed.dao.flushCache import org.jetbrains.exposed.sql.* import org.jetbrains.exposed.sql.statements.api.ExposedBlob import org.jetbrains.exposed.sql.transactions.transaction @@ -64,7 +63,7 @@ import javax.xml.bind.JAXBContext import kotlin.system.exitProcess val logger: Logger = LoggerFactory.getLogger("tech.libeufin.sandbox") -const val SANDBOX_VERSION = "0:0:0" +const val PROTOCOL_VERSION_UNIFIED = "0:0:0" // Every protocol is still using the same version. const val SANDBOX_DB_ENV_VAR_NAME = "LIBEUFIN_SANDBOX_DB_CONNECTION" private val adminPassword: String? = System.getenv("LIBEUFIN_SANDBOX_ADMIN_PASSWORD") var WITH_AUTH = true // Needed by helpers too, hence not making it private. @@ -1251,7 +1250,7 @@ val sandboxApp: Application.() -> Unit = { val demobank = ensureDemobank(call) call.respond(SandboxConfig( name = "taler-bank-integration", - version = SANDBOX_VERSION, + version = PROTOCOL_VERSION_UNIFIED, currency = demobank.config.currency )) return@get -- cgit v1.2.3