[fix #2957] no matching clause error in transaction details

symbol is a string, add readable error in case happens again
This commit is contained in:
Eric Dvorsak 2018-01-09 09:11:40 +01:00
parent a3f6169088
commit 4fe3c63923
No known key found for this signature in database
GPG Key ID: 932AC1CE5F05DE0C
2 changed files with 3 additions and 2 deletions

View File

@ -208,7 +208,8 @@
(defn- pretty-print-asset [symbol amount] (defn- pretty-print-asset [symbol amount]
(case symbol (case symbol
;; TODO (jeluard) Format tokens amount once tokens history is supported ;; TODO (jeluard) Format tokens amount once tokens history is supported
:ETH (if amount (money/wei->str :eth amount) "..."))) :ETH (if amount (money/wei->str :eth amount) "...")
(throw (str "Unknown asset symbol: " symbol))))
(defn details-header [{:keys [value date type symbol]}] (defn details-header [{:keys [value date type symbol]}]

View File

@ -25,7 +25,7 @@
{:value value {:value value
;; timestamp is in seconds, we convert it in ms ;; timestamp is in seconds, we convert it in ms
:timestamp (str timeStamp "000") :timestamp (str timeStamp "000")
:symbol "ETH" :symbol :ETH
:type (if inbound? :inbound :outbound) :type (if inbound? :inbound :outbound)
:block blockNumber :block blockNumber
:hash hash :hash hash