Unified Address support #8
1 changed files with 2 additions and 7 deletions
|
@ -372,12 +372,7 @@ listCountries :: Action IO [Document]
|
||||||
listCountries = rest =<< find (select [] "countries")
|
listCountries = rest =<< find (select [] "countries")
|
||||||
|
|
||||||
sendPin ::
|
sendPin ::
|
||||||
BS.ByteString
|
BS.ByteString -> BS.ByteString -> T.Text -> T.Text -> T.Text -> IO String
|
||||||
-> BS.ByteString
|
|
||||||
-> T.Text
|
|
||||||
-> T.Text
|
|
||||||
-> T.Text
|
|
||||||
-> Action IO String
|
|
||||||
sendPin nodeUser nodePwd nodeAddress addr pin = do
|
sendPin nodeUser nodePwd nodeAddress addr pin = do
|
||||||
let pd =
|
let pd =
|
||||||
[ Data.Aeson.String nodeAddress
|
[ Data.Aeson.String nodeAddress
|
||||||
|
@ -414,7 +409,7 @@ addUser nodeUser nodePwd p db node (Just tx) = do
|
||||||
isNew <- liftIO $ isUserNew p db tx
|
isNew <- liftIO $ isUserNew p db tx
|
||||||
when isNew $ do
|
when isNew $ do
|
||||||
newPin <- liftIO generatePin
|
newPin <- liftIO generatePin
|
||||||
_ <- sendPin nodeUser nodePwd node (address tx) (T.pack newPin)
|
_ <- liftIO $ sendPin nodeUser nodePwd node (address tx) (T.pack newPin)
|
||||||
let pinHash =
|
let pinHash =
|
||||||
BLK.hash
|
BLK.hash
|
||||||
[ BA.pack . BS.unpack . C.pack . T.unpack $
|
[ BA.pack . BS.unpack . C.pack . T.unpack $
|
||||||
|
|
Loading…
Reference in a new issue