From 4fe3c63923780ce91ea158a7b9b01e8a8d4c68f6 Mon Sep 17 00:00:00 2001 From: Eric Dvorsak Date: Tue, 9 Jan 2018 09:11:40 +0100 Subject: [PATCH] [fix #2957] no matching clause error in transaction details symbol is a string, add readable error in case happens again --- src/status_im/ui/screens/wallet/transactions/views.cljs | 3 ++- src/status_im/utils/transactions.cljs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/status_im/ui/screens/wallet/transactions/views.cljs b/src/status_im/ui/screens/wallet/transactions/views.cljs index f5f3a829e3..5423a5c6d1 100644 --- a/src/status_im/ui/screens/wallet/transactions/views.cljs +++ b/src/status_im/ui/screens/wallet/transactions/views.cljs @@ -208,7 +208,8 @@ (defn- pretty-print-asset [symbol amount] (case symbol ;; 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]}] diff --git a/src/status_im/utils/transactions.cljs b/src/status_im/utils/transactions.cljs index 9032a5ceee..13a67b02a5 100644 --- a/src/status_im/utils/transactions.cljs +++ b/src/status_im/utils/transactions.cljs @@ -25,7 +25,7 @@ {:value value ;; timestamp is in seconds, we convert it in ms :timestamp (str timeStamp "000") - :symbol "ETH" + :symbol :ETH :type (if inbound? :inbound :outbound) :block blockNumber :hash hash