summaryrefslogtreecommitdiff
path: root/src/Main.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2021-12-27 22:46:21 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2021-12-29 23:30:46 +0100
commite9760baab9608419565e253cae101b24f87eb8e5 (patch)
tree3a411690d926f30baae81edbea7a436e22843361 /src/Main.hs
parent2903fd39c39357168a7cbb8b6821a0c99ed1e5a7 (diff)
Pairing: refactor common logic into the base module
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/Main.hs b/src/Main.hs
index 1515648..3045f94 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -294,14 +294,11 @@ cmdUpdateIdentity = void $ do
cmdAttach :: Command
cmdAttach = join $ attachToOwner
- <$> asks ciPrint
- <*> (maybe (throwError "no peer selected") return =<< gets csPeer)
+ <$> (maybe (throwError "no peer selected") return =<< gets csPeer)
cmdAttachAccept :: Command
cmdAttachAccept = join $ attachAccept
- <$> asks ciPrint
- <*> asks ciHead
- <*> (maybe (throwError "no peer selected") return =<< gets csPeer)
+ <$> (maybe (throwError "no peer selected") return =<< gets csPeer)
cmdContacts :: Command
cmdContacts = do
@@ -315,14 +312,11 @@ cmdContacts = do
cmdContactAdd :: Command
cmdContactAdd = join $ contactRequest
- <$> asks ciPrint
- <*> (maybe (throwError "no peer selected") return =<< gets csPeer)
+ <$> (maybe (throwError "no peer selected") return =<< gets csPeer)
cmdContactAccept :: Command
cmdContactAccept = join $ contactAccept
- <$> asks ciPrint
- <*> asks ciHead
- <*> (maybe (throwError "no peer selected") return =<< gets csPeer)
+ <$> (maybe (throwError "no peer selected") return =<< gets csPeer)
cmdDiscoveryInit :: Command
cmdDiscoveryInit = void $ do