gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] branch master updated: fix txs list generation


From: gnunet
Subject: [libeufin] branch master updated: fix txs list generation
Date: Fri, 14 Jan 2022 19:50:50 +0100

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 817bb974 fix txs list generation
817bb974 is described below

commit 817bb974657fb860bf786532076fe85108936d3f
Author: ms <ms@taler.net>
AuthorDate: Fri Jan 14 19:50:30 2022 +0100

    fix txs list generation
---
 sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt | 5 ++++-
 sandbox/src/main/resources/static/spa.html            | 4 ++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt 
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
index 33b761f6..17e313e3 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
@@ -1323,10 +1323,11 @@ val sandboxApp: Application.() -> Unit = {
                          * Get a history page - from the calling bank account 
- having
                          * 'firstElementId' as the latest transaction in it.  
*/
                         fun getPage(firstElementId: Long): 
Iterable<BankAccountTransactionEntity> {
+                            logger.debug("History page from tx 
$firstElementId, including $size txs in the past.")
                             return BankAccountTransactionEntity.find {
                                 (BankAccountTransactionsTable.id lessEq 
firstElementId) and
                                         (BankAccountTransactionsTable.account 
eq bankAccount.id)
-                            }.take(size)
+                            }.sortedByDescending { it.id.value }.take(size)
                         }
                         val lt: BankAccountTransactionEntity? = 
bankAccount.lastTransaction
                         if (lt == null) return@transaction
@@ -1336,6 +1337,8 @@ val sandboxApp: Application.() -> Unit = {
                          * desired one is found.  */
                         for (i in 0..(page)) {
                             val pageBuf = getPage(nextPageIdUpperLimit)
+                            logger.debug("Processing page:")
+                            pageBuf.forEach { logger.debug("${it.id} 
${it.subject} ${it.amount}") }
                             if (pageBuf.none()) return@transaction
                             nextPageIdUpperLimit = pageBuf.last().id.value - 1
                             if (i == page) pageBuf.forEach {
diff --git a/sandbox/src/main/resources/static/spa.html 
b/sandbox/src/main/resources/static/spa.html
index dace5308..8b2aaa26 100644
--- a/sandbox/src/main/resources/static/spa.html
+++ b/sandbox/src/main/resources/static/spa.html
@@ -1,3 +1,3 @@
 <!DOCTYPE html><html lang="en" class="has-aside-left 
has-aside-mobile-transition has-navbar-fixed-top 
has-aside-expanded"><head><meta charset="utf-8"><title>taler-bank</title><meta 
name="viewport" content="width=device-width,initial-scale=1"><meta 
name="mobile-web-app-capable" content="yes"><meta 
name="apple-mobile-web-app-capable" content="yes"><link rel="icon" 
href="data:;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAABILAAASCwAAAAAAAAAAAAD/////////////////////////
 [...]
-//# 
sourceMappingURL=polyfills.61bd8.js.map</script><script>!function(t){function 
e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return 
t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var 
r={};e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof
 
Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=funct
 [...]
-//# sourceMappingURL=bundle.9b6ea.js.map</script></body></html>
\ No newline at end of file
+//# 
sourceMappingURL=polyfills.61bd8.js.map</script><script>!function(t){function 
e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return 
t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var 
r={};e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof
 
Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=funct
 [...]
+//# sourceMappingURL=bundle.16c37.js.map</script></body></html>
\ 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]