haskoin-store-data 0.65.2 → 0.65.5
raw patch · 4 files changed
+26/−6 lines, 4 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
+ Haskoin.Store.Data: [binfoHistoryFee] :: BinfoHistory -> !Double
- Haskoin.Store.Data: BinfoHistory :: !Text -> !Text -> !Text -> !Double -> !Double -> !Double -> !Double -> !TxHash -> BinfoHistory
+ Haskoin.Store.Data: BinfoHistory :: !Text -> !Text -> !Text -> !Double -> !Double -> !Double -> !Double -> !TxHash -> !Double -> BinfoHistory
- Haskoin.Store.Data: toBinfoHistory :: Int64 -> Word64 -> Double -> Double -> TxHash -> BinfoHistory
+ Haskoin.Store.Data: toBinfoHistory :: Int64 -> Word64 -> Double -> Double -> Word64 -> TxHash -> BinfoHistory
Files
- CHANGELOG.md +12/−0
- haskoin-store-data.cabal +2/−2
- src/Haskoin/Store/Data.hs +11/−4
- test/Haskoin/Store/DataSpec.hs +1/−0
CHANGELOG.md view
@@ -4,6 +4,18 @@ 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.65.5+### Added+- Fee field added to Blockchain.info-style export-history endpoint.++## 0.65.4+### Changed+- Bump version due to Git mistake.++## 0.65.3+### Added+- IPv6 peer support.+ ## 0.65.2 ### Fixed - Correct lazy bytestring deserialization algorithm for web client.
haskoin-store-data.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: aec36a011eca51b19afe9d2bb6669946fbccd54349c55d788b1d236a3fb074c8+-- hash: 4d0d11cec087e9b2fb4e83ec304affb161540dcb95249d85f6580b161d85abf7 name: haskoin-store-data-version: 0.65.2+version: 0.65.5 synopsis: Data for Haskoin Store description: Please see the README on GitHub at <https://github.com/haskoin/haskoin-store#readme> category: Bitcoin, Finance, Network
src/Haskoin/Store/Data.hs view
@@ -3137,7 +3137,8 @@ binfoHistoryValueThen :: !Double, binfoHistoryValueNow :: !Double, binfoHistoryExchangeRateThen :: !Double,- binfoHistoryTx :: !TxHash+ binfoHistoryTx :: !TxHash,+ binfoHistoryFee :: !Double } deriving (Eq, Show, Generic, NFData) @@ -3151,7 +3152,8 @@ "value_then" .= binfoHistoryValueThen, "value_now" .= binfoHistoryValueNow, "exchange_rate_then" .= binfoHistoryExchangeRateThen,- "tx" .= binfoHistoryTx+ "tx" .= binfoHistoryTx,+ "fee" .= binfoHistoryFee ] instance FromJSON BinfoHistory where@@ -3164,6 +3166,7 @@ binfoHistoryValueNow <- o .: "value_now" binfoHistoryExchangeRateThen <- o .: "exchange_rate_then" binfoHistoryTx <- o .: "tx"+ binfoHistoryFee <- o .: "fee" return BinfoHistory {..} toBinfoHistory ::@@ -3171,9 +3174,10 @@ Word64 -> Double -> Double ->+ Word64 -> TxHash -> BinfoHistory-toBinfoHistory satoshi timestamp rate_then rate_now txhash =+toBinfoHistory satoshi timestamp rate_then rate_now fee txhash = BinfoHistory { binfoHistoryDate = T.pack $ formatTime defaultTimeLocale "%Y-%m-%d" t,@@ -3190,13 +3194,16 @@ binfoHistoryExchangeRateThen = rate_then, binfoHistoryTx =- txhash+ txhash,+ binfoHistoryFee =+ fromRational f } where t = posixSecondsToUTCTime (realToFrac timestamp) v = toRational satoshi / (100 * 1000 * 1000) r1 = toRational rate_then r2 = toRational rate_now+ f = toRational fee / (100 * 1000 * 1000) v1 = v * r1 v2 = v * r2
test/Haskoin/Store/DataSpec.hs view
@@ -616,6 +616,7 @@ binfoHistoryValueNow <- arbitrary binfoHistoryExchangeRateThen <- arbitrary binfoHistoryTx <- arbitraryTxHash+ binfoHistoryFee <- arbitrary return BinfoHistory {..} instance Arbitrary BinfoUnspent where