From b47f53777d4e8e129c4eefe91da299e890d3aeb0 Mon Sep 17 00:00:00 2001 From: Mohsen Date: Fri, 9 Aug 2024 21:39:07 +0330 Subject: [PATCH] [#20971] fix: app crash when collectible max limit is nan (#20992) --- src/status_im/contexts/wallet/collectible/utils.cljs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/status_im/contexts/wallet/collectible/utils.cljs b/src/status_im/contexts/wallet/collectible/utils.cljs index c0a0e8c6a4..dc7feb912c 100644 --- a/src/status_im/contexts/wallet/collectible/utils.cljs +++ b/src/status_im/contexts/wallet/collectible/utils.cljs @@ -6,11 +6,12 @@ (defn collectible-balance [collectible] - (-> collectible - :ownership - first - :balance - js/parseInt)) + (let [balance (-> collectible + :ownership + first + :balance + js/parseInt)] + (if (js/Number.isNaN balance) 0 balance))) (def supported-collectible-types #{"image/jpeg"