[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: bank: strip payto URI
From: |
gnunet |
Subject: |
[libeufin] branch master updated: bank: strip payto URI |
Date: |
Fri, 29 Sep 2023 17:58:54 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository libeufin.
The following commit(s) were added to refs/heads/master by this push:
new 83442954 bank: strip payto URI
83442954 is described below
commit 8344295468529d906af8abc12ea6244bf6a9a73e
Author: Florian Dold <florian@dold.me>
AuthorDate: Fri Sep 29 17:58:59 2023 +0200
bank: strip payto URI
---
bank/src/main/kotlin/tech/libeufin/bank/WireGatewayApiHandlers.kt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/bank/src/main/kotlin/tech/libeufin/bank/WireGatewayApiHandlers.kt
b/bank/src/main/kotlin/tech/libeufin/bank/WireGatewayApiHandlers.kt
index 7e5d154c..8833177c 100644
--- a/bank/src/main/kotlin/tech/libeufin/bank/WireGatewayApiHandlers.kt
+++ b/bank/src/main/kotlin/tech/libeufin/bank/WireGatewayApiHandlers.kt
@@ -27,6 +27,7 @@ import io.ktor.server.request.*
import io.ktor.server.response.*
import io.ktor.server.routing.*
import net.taler.common.errorcodes.TalerErrorCode
+import tech.libeufin.util.stripIbanPayto
import java.time.Instant
fun Routing.talerWireGatewayHandlers(db: Database, ctx:
BankApplicationContext) {
@@ -76,10 +77,11 @@ fun Routing.talerWireGatewayHandlers(db: Database, ctx:
BankApplicationContext)
val req = call.receive<TransferRequest>()
// Checking for idempotency.
val maybeDoneAlready = db.talerTransferGetFromUid(req.request_uid)
+ val creditAccount = stripIbanPayto(req.credit_account)
if (maybeDoneAlready != null) {
val isIdempotent =
maybeDoneAlready.amount == req.amount
- && maybeDoneAlready.creditAccount == req.credit_account
+ && maybeDoneAlready.creditAccount == creditAccount
&& maybeDoneAlready.exchangeBaseUrl ==
req.exchange_base_url
&& maybeDoneAlready.wtid == req.wtid
if (isIdempotent) {
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libeufin] branch master updated: bank: strip payto URI,
gnunet <=