summaryrefslogtreecommitdiff
path: root/src/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Main.hs b/src/Main.hs
index b3f503d..cbefeb2 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -113,7 +113,8 @@ main = do
Nothing -> error "ref does not exist"
Just refs
| Just idt <- validateIdentityF $ map wrappedLoad refs -> do
- BC.putStrLn . showRefDigest . refDigest . storedRef . idData =<< interactiveIdentityUpdate idt
+ BC.putStrLn . showRefDigest . refDigest . storedRef . idData =<<
+ (either fail return <=< runExceptT $ runReaderT (interactiveIdentityUpdate idt) st)
| otherwise -> error "invalid identity"
["test"] -> runTestTool st
@@ -413,7 +414,7 @@ cmdDiscoveryInit = void $ do
cmdDiscovery :: Command
cmdDiscovery = void $ do
Just peer <- gets csIcePeer
- st <- gets (storedStorage . headStoredObject . csHead)
+ st <- getStorage
sref <- asks ciLine
eprint <- asks ciPrint
liftIO $ readRef st (BC.pack sref) >>= \case