added suggestions

This commit is contained in:
2022-07-26 07:01:18 -07:00
parent 96c80853ef
commit 84f7e734f0
65 changed files with 130 additions and 1140 deletions

View File

@@ -7,8 +7,7 @@
:refer [->graphql assert-admin can-see-client? is-admin?]]
[auto-ap.routes.queries :as q]
[auto-ap.square.core :as square]
[auto-ap.utils :refer [by heartbeat]]
[auto-ap.yodlee.core :refer [in-memory-cache]]
[auto-ap.utils :refer [heartbeat]]
[clj-time.coerce :as coerce]
[clojure.java.io :as io]
[clojure.string :as str]
@@ -253,6 +252,7 @@
(catch Exception e
(log/error "Can't refresh current balance" e)))))
#_{:clj-kondo/ignore [:clojure-lsp/unused-public-var]}
(defn refresh-all-current-balance []
(lc/with-context {:source "current-balance-cache"}
(build-current-balance (->> (d/query {:query {:find ['?ba]
@@ -285,9 +285,7 @@
(update c :client/bank-accounts
(fn [bank-accounts]
(mapv (fn [ba]
;; TODO remove when new yodlee replaces
(assoc ba :bank-account/yodlee-balance-old (get-in (by :id (mapcat :accounts @in-memory-cache) )
[(:bank-account/yodlee-account-id ba) :balance :amount])))
(assoc ba :bank-account/yodlee-balance-old nil))
bank-accounts))))))))