commit 8ca8c368bca8ef9b2963a75eb83f9d32a0cd5eda
parent 3f9689f21443af123fb1ac01fab4fba47d7b2eb5
Author: MS <ms@taler.net>
Date: Wed, 12 Apr 2023 11:09:38 +0200
comments, indentation.
Diffstat:
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/Taler.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/Taler.kt
@@ -506,15 +506,17 @@ private suspend fun historyIncoming(call: ApplicationCall) {
/**
* NOTE: the LISTEN command MAY also go inside this transaction,
- * but that uses a connection other than the one provided by the
+ * but LISTEN uses a connection other than the one provided by the
* transaction block. More facts on the consequences are needed.
*/
var result: List<TalerIncomingPaymentEntity> = transaction {
TalerIncomingPaymentEntity.find { startCmpOp }.orderTaler(delta)
}
+ // The request was lucky, unlisten then.
if (result.isNotEmpty() && listenHandle != null)
listenHandle.postgresUnlisten()
+ // The request was NOT lucky, wait now.
if (result.isEmpty() && listenHandle != null && longPollTimeout != null) {
logger.debug("Waiting for NOTIFY on channel ${listenHandle.channelName}," +
" with timeout: $longPollTimeoutPar ms")
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/CircuitApi.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/CircuitApi.kt
@@ -320,6 +320,7 @@ fun circuitApi(circuitRoute: Route) {
)
op.status = CashoutOperationStatus.CONFIRMED
op.confirmationTime = getUTCnow().toInstant().toEpochMilli()
+ // TODO(signal this payment over LIBEUFIN_REGIO_INCOMING)
}
call.respond(HttpStatusCode.NoContent)
return@post
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Helpers.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Helpers.kt
@@ -460,5 +460,4 @@ fun prepareEbicsPayload(
}
val enc = CryptoUtil.encryptEbicsE002(compressedResponse, pub)
return Pair(Base64.getEncoder().encodeToString(enc.encryptedData), enc)
-
}