commit 39c230e5d1f319ea1b4498e36eb71e8cec175c10 parent d8ffade7e6ff01b1e46284adc52be0a91e405927 Author: MS <ms@taler.net> Date: Thu, 25 May 2023 15:42:29 +0200 Fixing /config response. Using the Libtool "CURRENT:revision:AGE" version format. All the versions are however set to 0:0:0 now. Diffstat:
4 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/Taler.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/Taler.kt @@ -666,7 +666,7 @@ fun talerFacadeRoutes(route: Route) { PermissionQuery("facade", facadeId, "facade.talerwiregateway.history") ) call.respond(object { - val version = "0.0.0" + val version = "0:0:0" val name = "taler-wire-gateway" val currency = getCurrency(facadeId) }) diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt @@ -255,7 +255,8 @@ val nexusApp: Application.() -> Unit = { get("/config") { call.respond( makeJsonObject { - prop("version", getVersion()) + prop("version", "0:0:0") + prop("name", "nexus-native") } ) return@get diff --git 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 @@ -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