[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: comment about matching, don't crash on
From: |
gnunet |
Subject: |
[libeufin] branch master updated: comment about matching, don't crash on certain transactions |
Date: |
Thu, 18 Jun 2020 17:54:05 +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 abfd36a comment about matching, don't crash on certain transactions
abfd36a is described below
commit abfd36afeb4cb497914a0e9756d2ef82dfd17a6c
Author: Florian Dold <florian.dold@gmail.com>
AuthorDate: Thu Jun 18 21:23:42 2020 +0530
comment about matching, don't crash on certain transactions
---
.../tech/libeufin/nexus/bankaccount/BankAccount.kt | 29 ++++++++++------------
1 file changed, 13 insertions(+), 16 deletions(-)
diff --git
a/nexus/src/main/kotlin/tech/libeufin/nexus/bankaccount/BankAccount.kt
b/nexus/src/main/kotlin/tech/libeufin/nexus/bankaccount/BankAccount.kt
index 80f79c0..3140075 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/bankaccount/BankAccount.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/bankaccount/BankAccount.kt
@@ -137,7 +137,7 @@ fun processCamtMessage(
}
val transactions = getTransactions(camtDoc)
logger.info("found ${transactions.size} transactions")
- txloop@for (tx in transactions) {
+ txloop@ for (tx in transactions) {
val acctSvcrRef = tx.accountServicerReference
if (acctSvcrRef == null) {
// FIXME(dold): Report this!
@@ -164,21 +164,18 @@ fun processCamtMessage(
// assuming batches contain always one element, as aren't fully
// implemented now.
val uniqueBatchElement = tx.details.get(0)
- markInitiatedAsConfirmed(
- // if the user has two initiated payments under the same
- // IBAN with the same subject, then this logic will cause
- // problems. But a programmatic user should take care of
this.
- uniqueBatchElement.unstructuredRemittanceInformation,
- if (uniqueBatchElement.relatedParties.debtorAccount !is
AccountIdentificationIban) {
- throw NexusError(
- HttpStatusCode.InternalServerError,
- "Parsed CAMT didn't have IBAN in debtor!"
- )
- } else {
- uniqueBatchElement.relatedParties.debtorAccount.iban
- },
- rawEntity.id.value
- )
+
+ // if the user has two initiated payments under the same
+ // IBAN with the same subject, then this logic will cause
+ // problems. But a programmatic user should take care of this.
+ // FIXME(dold): Actually, we should do the matching via the
Refs of the camt message.
+ if (uniqueBatchElement.relatedParties.debtorAccount is
AccountIdentificationIban) {
+ markInitiatedAsConfirmed(
+ uniqueBatchElement.unstructuredRemittanceInformation,
+ uniqueBatchElement.relatedParties.debtorAccount.iban,
+ rawEntity.id.value
+ )
+ }
}
}
}
--
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: comment about matching, don't crash on certain transactions,
gnunet <=