haskoin-store 0.53.1 → 0.53.2
raw patch · 3 files changed
+23/−22 lines, 3 filesdep ~haskoin-store-dataPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: haskoin-store-data
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- haskoin-store.cabal +5/−5
- src/Haskoin/Store/Web.hs +14/−17
CHANGELOG.md view
@@ -4,6 +4,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html) +## 0.53.2+### Fixed+- Return output in satoshi for some endpoints.+ ## 0.53.1 ### Fixed - Return 404 in case of bad address.
haskoin-store.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: e2e972c65bb4fdaa07911345e1dff14476440ef8e22f7030a59eb3492a65582f+-- hash: 7f0440e3b9697fe1c6eead20f4f9dad0b4795c894bbd89689d0049b68916587d name: haskoin-store-version: 0.53.1+version: 0.53.2 synopsis: Storage and index for Bitcoin and Bitcoin Cash description: Please see the README on GitHub at <https://github.com/haskoin/haskoin-store#readme> category: Bitcoin, Finance, Network@@ -62,7 +62,7 @@ , hashable >=1.3.0.0 , haskoin-core >=0.19.0 , haskoin-node >=0.17.0- , haskoin-store-data ==0.53.1+ , haskoin-store-data ==0.53.2 , hedis >=0.12.13 , http-types >=0.12.3 , lens >=4.18.1@@ -116,7 +116,7 @@ , haskoin-core >=0.19.0 , haskoin-node >=0.17.0 , haskoin-store- , haskoin-store-data ==0.53.1+ , haskoin-store-data ==0.53.2 , hedis >=0.12.13 , http-types >=0.12.3 , lens >=4.18.1@@ -175,7 +175,7 @@ , haskoin-core >=0.19.0 , haskoin-node >=0.17.0 , haskoin-store- , haskoin-store-data ==0.53.1+ , haskoin-store-data ==0.53.2 , hedis >=0.12.13 , hspec >=2.7.1 , http-types >=0.12.3
src/Haskoin/Store/Web.hs view
@@ -2076,8 +2076,7 @@ tx <- getBinfoTx txid >>= \case Right t -> return t Left e -> raise_ e- S.text . cs . show . (/ (100 * 1000 * 1000 :: Double)) .- fromIntegral . sum . map outputAmount $ transactionOutputs tx+ S.text . cs . show . sum . map outputAmount $ transactionOutputs tx scottyBinfoTxFees :: (MonadUnliftIO m, MonadLoggerIO m) => WebT m () scottyBinfoTxFees = do@@ -2086,13 +2085,13 @@ tx <- getBinfoTx txid >>= \case Right t -> return t Left e -> raise_ e- let i = sum . map inputAmount . filter is_input $+ let i = sum . map inputAmount . filter f $ transactionInputs tx o = sum . map outputAmount $ transactionOutputs tx- S.text . cs . show $ fromIntegral (i - o) / (100 * 1000 * 1000 :: Double)+ S.text . cs . show $ i - o where- is_input StoreInput{} = True- is_input StoreCoinbase{} = False+ f StoreInput{} = True+ f StoreCoinbase{} = False scottyBinfoTxResult :: (MonadUnliftIO m, MonadLoggerIO m) => WebT m () scottyBinfoTxResult = do@@ -2102,16 +2101,16 @@ tx <- getBinfoTx txid >>= \case Right t -> return t Left e -> raise_ e- let i = toInteger . sum . map inputAmount . filter (is_input addr) $+ let i = toInteger . sum . map inputAmount . filter (f addr) $ transactionInputs tx- o = toInteger . sum . map outputAmount . filter (is_output addr) $+ o = toInteger . sum . map outputAmount . filter (g addr) $ transactionOutputs tx S.text . cs . show $ o - i where- is_input addr StoreInput{inputAddress = Just a} = a == addr- is_input _ _ = False- is_output addr StoreOutput{outputAddr = Just a} = a == addr- is_output _ _ = False+ f addr StoreInput{inputAddress = Just a} = a == addr+ f _ _ = False+ g addr StoreOutput{outputAddr = Just a} = a == addr+ g _ _ = False @@ -2122,12 +2121,10 @@ tx <- getBinfoTx txid >>= \case Right t -> return t Left e -> raise_ e- S.text . cs . show . (/ (100 * 1000 * 1000 :: Double)) .- fromIntegral . sum . map inputAmount . filter is_input $- transactionInputs tx+ S.text . cs . show . sum . map inputAmount . filter f $ transactionInputs tx where- is_input StoreInput{} = True- is_input StoreCoinbase{} = False+ f StoreInput{} = True+ f StoreCoinbase{} = False scottyBinfoMempool :: (MonadUnliftIO m, MonadLoggerIO m) => WebT m () scottyBinfoMempool = do