Skip to content

Commit

Permalink
use bech32 for sigs too
Browse files Browse the repository at this point in the history
  • Loading branch information
Geometer1729 committed Sep 19, 2022
1 parent 15af9da commit 0dfa924
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Api.hs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import Control.Monad.IO.Class (MonadIO(liftIO))
import Data.ByteString.Bech32(encodeBech32,HumanReadablePart(HumanReadablePart))
import Data.Text(unpack)
import Lib (signWithEdKey, Id (Id),getPubKey)
import Hex(fromHex,toHex)
import Hex(fromHex)

app :: Application
app = serve @SignApi Proxy server
Expand All @@ -36,7 +36,7 @@ signTx w = do
let bytes = fromHex w
liftIO $ print bytes
signed <- liftIO $ signWithEdKey (Id 200) bytes True
return $ toHex signed
return $ unpack $ encodeBech32 (HumanReadablePart "ed25519_sig") signed

getPK :: Handler String
getPK = do
Expand Down

0 comments on commit 0dfa924

Please sign in to comment.