From 30a0547afdb3c913fd3ce1c54637df3b03deaff7 Mon Sep 17 00:00:00 2001 From: Ben Fiedler Date: Fri, 8 Oct 2021 16:50:16 +0200 Subject: [PATCH] importer/viseca: Do not import temporary transactions Their ID will change once confirmed, confusing the importer --- importer/viseca/viseca.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/importer/viseca/viseca.go b/importer/viseca/viseca.go index 1f176da..f278a3a 100644 --- a/importer/viseca/viseca.go +++ b/importer/viseca/viseca.go @@ -13,6 +13,7 @@ import ( "io" "log" "strconv" + "strings" "time" "git.sr.ht/~bfiedler/lutil/importer/types" @@ -88,6 +89,11 @@ func transactionFromRecord(r []string) *Transaction { return nil } + if strings.HasPrefix(r[ID], "AUTH") { + // This is an unconfirmed transaction, do not import it + return nil + } + return &Transaction{ id: r[ID], date: date, -- 2.38.4