                                                  [{"$match" {:to-id account-id}}
                                                   {"$group" {:_id "$to-id"
                                                              :total {"$sum" "$amount"}}}]))
-          sent-map (first (storage/aggregate db "transactions"
+          sent-map  (first (storage/aggregate db "transactions"
                                               [{"$match" {:from-id account-id}}
                                                {"$group" {:_id "$from-id"
                                                           :total {"$sum" "$amount"}}}]))

(defn- normalize-transactions [list]
  (reverse
   (sort-by :timestamp
            (map (fn [{:keys [amount]}]
                   (assoc transaction :amount (util/long->bigdecimal amount)))
                 list))))

;;(defn add-transaction-list-params [request-params] filter)

(defn add-transaction-list-params [request-params]
  (reduce-kv (fn [f name updater]
               (if-let [request-value (get-in request-params [name])]
                 (merge f (updater request-value))
                 f))
             {}

  (get-transaction   [bk account-id txid] nil)

  (make-transaction  [bk from-account-id amount to-account-id params]
    (let [timestamp (time/format (if-let [time (:timestamp params)] time (time/now)))
          transaction {:_id (str timestamp "-" from-account-id)
                       :blockchain "STUB"
                       :timestamp timestamp
