From 9912136ac9f938d36fb84e866c8cfa011990540b Mon Sep 17 00:00:00 2001 From: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com> Date: Thu, 19 Sep 2024 15:45:52 +0530 Subject: [PATCH] fix(wallet)_: crash on viewing dynamic file type collectibles (#21245) This commit removes the support for GIF file types for the collectibles. Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com> --- src/status_im/contexts/wallet/collectible/utils.cljs | 1 - .../contexts/wallet/common/collectibles_tab/view.cljs | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/status_im/contexts/wallet/collectible/utils.cljs b/src/status_im/contexts/wallet/collectible/utils.cljs index d3af46f0ba..d5cd56a81c 100644 --- a/src/status_im/contexts/wallet/collectible/utils.cljs +++ b/src/status_im/contexts/wallet/collectible/utils.cljs @@ -15,7 +15,6 @@ (def supported-collectible-types #{"image/jpeg" - "image/gif" "image/bmp" "image/png" "image/webp" diff --git a/src/status_im/contexts/wallet/common/collectibles_tab/view.cljs b/src/status_im/contexts/wallet/common/collectibles_tab/view.cljs index d576b1d587..7857e0449d 100644 --- a/src/status_im/contexts/wallet/common/collectibles_tab/view.cljs +++ b/src/status_im/contexts/wallet/common/collectibles_tab/view.cljs @@ -40,7 +40,8 @@ [quo/collectible-list-item {:type :card :image-src (:uri preview-url) - :avatar-image-src (:image-url collection-data) + :avatar-image-src (when (utils/supported-file? (:image-url collection-data)) + (:image-url collection-data)) :collectible-name (:name collectible-data) :supported-file? (utils/supported-file? (:animation-media-type collectible-data)) :gradient-color-index gradient-color