[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] 02/07: t_ms -> t_s
From: |
gnunet |
Subject: |
[libeufin] 02/07: t_ms -> t_s |
Date: |
Mon, 20 Dec 2021 17:44:45 +0100 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository libeufin.
commit 915e594fc38cf21be12816c1e97fee91522e87b9
Author: ms <ms@taler.net>
AuthorDate: Sun Dec 19 20:38:43 2021 +0100
t_ms -> t_s
---
nexus/src/main/kotlin/tech/libeufin/nexus/Anastasis.kt | 2 +-
nexus/src/main/kotlin/tech/libeufin/nexus/Taler.kt | 14 ++++----------
sandbox/src/main/resources/static/spa.html | 3 +++
3 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/Anastasis.kt
b/nexus/src/main/kotlin/tech/libeufin/nexus/Anastasis.kt
index 4697567e..a7ec84ef 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/Anastasis.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/Anastasis.kt
@@ -89,7 +89,7 @@ private suspend fun historyIncoming(call: ApplicationCall) {
history.incoming_transactions.add(
AnastasisIncomingBankTransaction(
// Rounded timestamp
- date = GnunetTimestamp((it.timestampMs / 1000) * 1000),
+ date = GnunetTimestamp(it.timestampMs / 1000L),
row_id = it.id.value,
amount = "${it.payment.currency}:${it.payment.amount}",
subject = it.subject,
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/Taler.kt
b/nexus/src/main/kotlin/tech/libeufin/nexus/Taler.kt
index 60cbe80f..f7e8fd88 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/Taler.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/Taler.kt
@@ -92,9 +92,7 @@ data class TalerOutgoingHistory(
var outgoing_transactions: MutableList<TalerOutgoingBankTransaction> =
mutableListOf()
)
-data class GnunetTimestamp(
- val t_ms: Long
-)
+data class GnunetTimestamp(val t_s: Long)
/**
* Sort query results in descending order for negative deltas, and ascending
otherwise.
@@ -228,7 +226,7 @@ private suspend fun talerTransfer(call: ApplicationCall) {
* Normally should point to the next round where the
background
* routine will send new PAIN.001 data to the bank; work
in progress..
*/
- timestamp =
roundTimestamp(GnunetTimestamp(System.currentTimeMillis())),
+ timestamp = GnunetTimestamp(System.currentTimeMillis() /
1000L),
row_id = opaqueRowId
)
),
@@ -237,10 +235,6 @@ private suspend fun talerTransfer(call: ApplicationCall) {
)
}
-fun roundTimestamp(t: GnunetTimestamp): GnunetTimestamp {
- return GnunetTimestamp(t.t_ms - (t.t_ms % 1000))
-}
-
fun talerFilter(payment: NexusBankTransactionEntity, txDtls:
TransactionDetails) {
val subject = txDtls.unstructuredRemittanceInformation
val debtorName = txDtls.debtor?.name
@@ -402,7 +396,7 @@ private suspend fun historyOutgoing(call: ApplicationCall) {
row_id = it.id.value,
amount = it.amount,
wtid = it.wtid,
- date =
GnunetTimestamp(it.preparedPayment.preparationDate),
+ date =
GnunetTimestamp(it.preparedPayment.preparationDate / 1000L),
credit_account = it.creditAccount,
debit_account = buildIbanPaytoUri(
subscriberBankAccount.iban,
@@ -442,7 +436,7 @@ private suspend fun historyIncoming(call: ApplicationCall) {
history.incoming_transactions.add(
TalerIncomingBankTransaction(
// Rounded timestamp
- date = GnunetTimestamp((it.timestampMs / 1000) * 1000),
+ date = GnunetTimestamp(it.timestampMs / 1000L),
row_id = it.id.value,
amount = "${it.payment.currency}:${it.payment.amount}",
reserve_pub = it.reservePublicKey,
diff --git a/sandbox/src/main/resources/static/spa.html
b/sandbox/src/main/resources/static/spa.html
new file mode 100644
index 00000000..7a3cf557
--- /dev/null
+++ b/sandbox/src/main/resources/static/spa.html
@@ -0,0 +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(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return
t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var
n={};e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},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.bca04.js.map</script></body></html>
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [libeufin] branch master updated (4482f8d4 -> 1d50e1fc), gnunet, 2021/12/20
- [libeufin] 01/07: serve SPA, gnunet, 2021/12/20
- [libeufin] 02/07: t_ms -> t_s,
gnunet <=
- [libeufin] 03/07: Withdrawal., gnunet, 2021/12/20
- [libeufin] 07/07: SPA, gnunet, 2021/12/20
- [libeufin] 05/07: Withdrawal., gnunet, 2021/12/20
- [libeufin] 06/07: SPA, gnunet, 2021/12/20
- [libeufin] 04/07: move default exchange selection at /confirm, gnunet, 2021/12/20