Don't crash if token is missing referrals

Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
This commit is contained in:
Gheorghe Pinzaru 2020-11-05 20:19:07 +03:00
parent 6d104d60e2
commit 6311077cec
No known key found for this signature in database
GPG Key ID: C9A094959935A952

View File

@ -56,7 +56,11 @@
(defn starter-pack [] (defn starter-pack []
(let [pack @(re-frame/subscribe [::invite/starter-pack]) (let [pack @(re-frame/subscribe [::invite/starter-pack])
tokens (utils/transform-tokens pack) tokens (utils/transform-tokens pack)
reward-text (cstr/join ", " (map (comp name :symbol first) tokens))] reward-text (->> tokens
(map (comp :symbol first))
(filter (comp not nil?))
(map name)
(cstr/join ", "))]
[rn/view {:style (starter-pack-style)} [rn/view {:style (starter-pack-style)}
[rn/view {:style (styles/reward-tokens-icons (count tokens))} [rn/view {:style (styles/reward-tokens-icons (count tokens))}
(doall (doall