commit 46d220c4df5a6cd2a452d3b1da8e056af32f4014
parent 75562a6d5d6044a059d63e376cfd6ec396284dd8
Author: Joel-Haeberli <haebu@rubigen.ch>
Date: Fri, 31 May 2024 15:36:38 +0200
fix: make wire gateway api more robust
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/c2ec/api-wire-gateway.go b/c2ec/api-wire-gateway.go
@@ -359,6 +359,10 @@ func historyIncoming(res http.ResponseWriter, req *http.Request) {
transactions := make([]IncomingReserveTransaction, 0)
for _, w := range withdrawals {
+ if w.Amount.Val == 0 && w.Amount.Frac == 0 {
+ LogInfo("wire-gateway-api", "ignoring zero amount withdrawal")
+ continue
+ }
transaction := NewIncomingReserveTransaction(w)
if transaction != nil {
transactions = append(transactions, *transaction)