                      (= (first first-val) :commodity) (string/trim (first (drop 1 first-val)))
                      (not (nil? second-val)) (string/trim (first (drop 1 second-val)))
                      :else nil)]
-    (->Amount quantity commodity)))
+    {:amount quantity :commodity commodity}))
 
 
 (defn transform-entry

;

(defrecord Header [date status code payee note])
(defrecord Amount [quantity commodity])
(defrecord Entry [header account account-lineage entry-type amount note])






(defn transform-amount
  "Transform a parse-tree amount into a map containing :amount and :commodity."
  [first-val second-val]
  (let [quantity (if (= (first first-val) :quantity)
                   (bigdec (string/replace (first (drop 1 first-val)) "," ""))
