From fcf44737a4ed7759b68ce8f7ac9e4b6390466fc3 Mon Sep 17 00:00:00 2001 From: Alexander Pantyuhov Date: Wed, 2 Nov 2016 22:19:45 +0300 Subject: [PATCH] Fix for red screen on login --- src/status_im/protocol/web3/delivery.cljs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/status_im/protocol/web3/delivery.cljs b/src/status_im/protocol/web3/delivery.cljs index 36a6d2a55b..d4227a4da0 100644 --- a/src/status_im/protocol/web3/delivery.cljs +++ b/src/status_im/protocol/web3/delivery.cljs @@ -207,12 +207,10 @@ (defn reset-pending-messages! [to] (doseq [key (@recipient->pending-message to)] - (swap! messages - (fn [messages] - (when (get-in messages key) - (update-in messages key assoc - :last-attempt 0 - :attempts 0)))))) + (when (get-in @messages key) + (swap! messages #(update-in % key assoc + :last-attempt 0 + :attempts 0))))) (defn reset-all-pending-messages! [] (reset! messages {}))