diff options
Diffstat (limited to 'main/State.hs')
-rw-r--r-- | main/State.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/main/State.hs b/main/State.hs index 76441df..d357844 100644 --- a/main/State.hs +++ b/main/State.hs @@ -44,14 +44,15 @@ loadLocalStateHead term st = loadHeads st >>= \case , ssValue = [ storedRef $ idExtData $ fromMaybe identity owner ] } storeHead st $ LocalState - { lsIdentity = idExtData identity + { lsPrev = Nothing + , lsIdentity = idExtData identity , lsShared = [ shared ] , lsOther = [] } updateSharedIdentity :: (MonadHead LocalState m, MonadError e m, FromErebosError e) => Terminal -> m () -updateSharedIdentity term = updateLocalHead_ $ updateSharedState_ $ \case +updateSharedIdentity term = updateLocalState_ $ updateSharedState_ $ \case Just identity -> do Just . toComposedIdentity <$> interactiveIdentityUpdate term identity Nothing -> throwOtherError "no existing shared identity" |