gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libeufin] branch master updated: close Zip file + DCE


From: gnunet
Subject: [libeufin] branch master updated: close Zip file + DCE
Date: Fri, 23 Sep 2022 17:07:54 +0200

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository libeufin.

The following commit(s) were added to refs/heads/master by this push:
     new dcc4a11c close Zip file + DCE
dcc4a11c is described below

commit dcc4a11c162b34f47eddedd1c6d28b1b4376403e
Author: MS <ms@taler.net>
AuthorDate: Fri Sep 23 16:35:47 2022 +0200

    close Zip file + DCE
---
 .../kotlin/tech/libeufin/sandbox/bankAccount.kt    | 41 ----------------------
 util/src/main/kotlin/zip.kt                        |  1 +
 2 files changed, 1 insertion(+), 41 deletions(-)

diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/bankAccount.kt 
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/bankAccount.kt
index 873371d0..2175ab0d 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/bankAccount.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/bankAccount.kt
@@ -55,45 +55,4 @@ fun balanceForAccount(bankAccount: BankAccountEntity): 
BigDecimal {
         }
     }
     return balance
-}
-
-// For now, returns everything.
-fun historyForAccount(bankAccount: BankAccountEntity): MutableList<RawPayment> 
{
-    val history = mutableListOf<RawPayment>()
-    transaction {
-        /**
-        FIXME: add the following condition too:
-        and (BankAccountTransactionsTable.date.between(start.millis, 
end.millis))
-         */
-        /**
-        FIXME: add the following condition too:
-        and (BankAccountTransactionsTable.date.between(start.millis, 
end.millis))
-         */
-        BankAccountTransactionEntity.find {
-            BankAccountTransactionsTable.account eq bankAccount.id
-        }.forEach {
-            history.add(
-                RawPayment(
-                    subject = it.subject,
-                    creditorIban = it.creditorIban,
-                    creditorBic = it.creditorBic,
-                    creditorName = it.creditorName,
-                    debtorIban = it.debtorIban,
-                    debtorBic = it.debtorBic,
-                    debtorName = it.debtorName,
-                    date = importDateFromMillis(it.date).toDashedDate(),
-                    amount = it.amount,
-                    currency = it.currency,
-                    // The line below produces a value too long (>35 chars),
-                    // and it makes the document invalid!
-                    // uid = "${it.pmtInfId}-${it.msgId}"
-                    uid = it.accountServicerReference,
-                    direction = it.direction,
-                    pmtInfId = it.pmtInfId
-                )
-            )
-
-        }
-    }
-    return history
 }
\ No newline at end of file
diff --git a/util/src/main/kotlin/zip.kt b/util/src/main/kotlin/zip.kt
index e22571b3..3f6f94a9 100644
--- a/util/src/main/kotlin/zip.kt
+++ b/util/src/main/kotlin/zip.kt
@@ -66,4 +66,5 @@ fun ByteArray.unzipWithLambda(process: (Pair<String, String>) 
-> Unit) {
             Pair(it.name, 
zipFile.getInputStream(it).readAllBytes().toString(Charsets.UTF_8))
         )
     }
+    zipFile.close()
 }
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]