diff options
author | MS <ms@taler.net> | 2023-04-12 11:09:38 +0200 |
---|---|---|
committer | MS <ms@taler.net> | 2023-04-12 11:09:38 +0200 |
commit | 8ca8c368bca8ef9b2963a75eb83f9d32a0cd5eda (patch) | |
tree | 410ee0779b61f6b3a412e3efd0722b0606892eab | |
parent | 3f9689f21443af123fb1ac01fab4fba47d7b2eb5 (diff) | |
download | libeufin-8ca8c368bca8ef9b2963a75eb83f9d32a0cd5eda.tar.gz libeufin-8ca8c368bca8ef9b2963a75eb83f9d32a0cd5eda.tar.bz2 libeufin-8ca8c368bca8ef9b2963a75eb83f9d32a0cd5eda.zip |
comments, indentation.
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 index ba37d8be..8cdbae02 100644 --- 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 index d63dac33..d3786968 100644 --- 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 index 54519bbb..a2454ff4 100644 --- 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) - } |