fix: crash when selecting a collectible (#18541)

Signed-off-by: Brian Sztamfater <brian@status.im>
This commit is contained in:
Brian Sztamfater 2024-01-18 16:05:09 -03:00 committed by GitHub
parent f8cdb3bd7b
commit e609e2ff6a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 3 deletions

View File

@ -18,7 +18,7 @@
:assets [assets/view] :assets [assets/view]
:collectibles [collectibles/view :collectibles [collectibles/view
{:collectibles collectible-list {:collectibles collectible-list
:on-collectible-press (fn [id] :on-collectible-press (fn [{:keys [id]}]
(rf/dispatch [:wallet/get-collectible-details id]) (rf/dispatch [:wallet/get-collectible-details id])
(rf/dispatch [:navigate-to :wallet-collectible]))}] (rf/dispatch [:navigate-to :wallet-collectible]))}]
:activity [activity/view] :activity [activity/view]

View File

@ -33,6 +33,7 @@
:render-fn (fn [{:keys [preview-url] :as collectible}] :render-fn (fn [{:keys [preview-url] :as collectible}]
[quo/collectible [quo/collectible
{:images [preview-url] {:images [preview-url]
:on-press #(on-collectible-press collectible)}])}]))) :on-press #(when on-collectible-press
(on-collectible-press collectible))}])}])))
(def view (quo.theme/with-theme view-internal)) (def view (quo.theme/with-theme view-internal))

View File

@ -15,7 +15,7 @@
:assets [assets/view] :assets [assets/view]
:collectibles [collectibles/view :collectibles [collectibles/view
{:collectibles collectible-list {:collectibles collectible-list
:on-collectible-press (fn [id] :on-collectible-press (fn [{:keys [id]}]
(rf/dispatch [:wallet/get-collectible-details id]) (rf/dispatch [:wallet/get-collectible-details id])
(rf/dispatch [:navigate-to :wallet-collectible]))}] (rf/dispatch [:navigate-to :wallet-collectible]))}]
[activity/view])])) [activity/view])]))