gnunet-svn
[Top][All Lists]
Advanced

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

[taler-cashless2ecash] branch master updated: fix: wire gateway format


From: gnunet
Subject: [taler-cashless2ecash] branch master updated: fix: wire gateway format
Date: Sat, 18 May 2024 15:19:13 +0200

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

joel-haeberli pushed a commit to branch master
in repository cashless2ecash.

The following commit(s) were added to refs/heads/master by this push:
     new f427a43  fix: wire gateway format
f427a43 is described below

commit f427a43ab0ed83535ffac06dc6fed189c99dd808
Author: Joel-Haeberli <haebu@rubigen.ch>
AuthorDate: Sat May 18 15:19:08 2024 +0200

    fix: wire gateway format
---
 c2ec/api-wire-gateway.go | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/c2ec/api-wire-gateway.go b/c2ec/api-wire-gateway.go
index 91a1e01..10c7a1e 100644
--- a/c2ec/api-wire-gateway.go
+++ b/c2ec/api-wire-gateway.go
@@ -300,16 +300,21 @@ func historyIncoming(res http.ResponseWriter, req 
*http.Request) {
                return
        }
 
-       transactions := make([]*IncomingReserveTransaction, 0)
+       transactions := make([]IncomingReserveTransaction, 0)
        for _, w := range withdrawals {
                transaction := NewIncomingReserveTransaction(w)
                if transaction != nil {
-                       transactions = append(transactions, transaction)
+                       transactions = append(transactions, *transaction)
                }
        }
 
-       encoder := NewJsonCodec[[]*IncomingReserveTransaction]()
-       enc, err := encoder.EncodeToBytes(&transactions)
+       hist := IncomingHistory{
+               IncomingTransactions: transactions,
+               CreditAccount:        CONFIG.Server.CreditAccount,
+       }
+
+       encoder := NewJsonCodec[IncomingHistory]()
+       enc, err := encoder.EncodeToBytes(&hist)
        if err != nil {
                LogError("wire-gateway-api", err)
                res.WriteHeader(HTTP_INTERNAL_SERVER_ERROR)

-- 
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]