diff options
Diffstat (limited to 'src/Contact.hs')
-rw-r--r-- | src/Contact.hs | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/Contact.hs b/src/Contact.hs index 70e79b9..1dc926e 100644 --- a/src/Contact.hs +++ b/src/Contact.hs @@ -153,12 +153,11 @@ contactReject :: (MonadIO m, MonadError String m) => Peer -> m () contactReject = pairingReject @ContactAccepted Proxy finalizeContact :: MonadHead LocalState m => UnifiedIdentity -> m () -finalizeContact identity = do +finalizeContact identity = updateSharedState_ $ \contacts -> do st <- getStorage - updateSharedState_ $ \contacts -> do - cdata <- wrappedStore st ContactData - { cdPrev = [] - , cdIdentity = idDataF $ finalOwner identity - , cdName = Nothing - } - storeSetAdd st (mergeSorted @Contact [cdata]) contacts + cdata <- wrappedStore st ContactData + { cdPrev = [] + , cdIdentity = idDataF $ finalOwner identity + , cdName = Nothing + } + storeSetAdd st (mergeSorted @Contact [cdata]) contacts |