Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit e9cd9a3

Browse files
committed
Merge pull request #3688 [cleanup old storage] into CO-372/TheGreatCleanup
2 parents 6c6bd43 + ec978a9 commit e9cd9a3

File tree

1 file changed

+8
-10
lines changed
  • wallet-new/src/Cardano/Wallet/API/V1

1 file changed

+8
-10
lines changed

wallet-new/src/Cardano/Wallet/API/V1/Types.hs

+8-10
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,6 @@ import Pos.Infra.Util.LogSafe (BuildableSafeGen (..), SecureLog (..),
205205
buildSafe, buildSafeList, buildSafeMaybe,
206206
deriveSafeBuildable, plainOrSecureF)
207207
import Pos.Util.Servant (Flaggable (..))
208-
import Pos.Wallet.Web.ClientTypes.Instances ()
209-
import qualified Pos.Wallet.Web.State.Storage as OldStorage
210208
import Test.Pos.Core.Arbitrary ()
211209

212210
-- | Declare generic schema, while documenting properties
@@ -911,31 +909,31 @@ instance ToSchema EstimatedCompletionTime where
911909
)
912910
)
913911

914-
915-
newtype SyncThroughput = SyncThroughput (MeasuredIn 'BlocksPerSecond OldStorage.SyncThroughput)
912+
newtype SyncThroughput
913+
= SyncThroughput (MeasuredIn 'BlocksPerSecond Core.BlockCount)
916914
deriving (Show, Eq)
917915

918916
mkSyncThroughput :: Core.BlockCount -> SyncThroughput
919-
mkSyncThroughput = SyncThroughput . MeasuredIn . OldStorage.SyncThroughput
917+
mkSyncThroughput = SyncThroughput . MeasuredIn
920918

921919
instance Ord SyncThroughput where
922-
compare (SyncThroughput (MeasuredIn (OldStorage.SyncThroughput (Core.BlockCount b1))))
923-
(SyncThroughput (MeasuredIn (OldStorage.SyncThroughput (Core.BlockCount b2)))) =
920+
compare (SyncThroughput (MeasuredIn (Core.BlockCount b1)))
921+
(SyncThroughput (MeasuredIn (Core.BlockCount b2))) =
924922
compare b1 b2
925923

926924
instance Arbitrary SyncThroughput where
927-
arbitrary = SyncThroughput . MeasuredIn . OldStorage.SyncThroughput <$> arbitrary
925+
arbitrary = SyncThroughput . MeasuredIn <$> arbitrary
928926

929927
deriveSafeBuildable ''SyncThroughput
930928
instance BuildableSafeGen SyncThroughput where
931-
buildSafeGen _ (SyncThroughput (MeasuredIn (OldStorage.SyncThroughput (Core.BlockCount blocks)))) = bprint ("{"
929+
buildSafeGen _ (SyncThroughput (MeasuredIn (Core.BlockCount blocks))) = bprint ("{"
932930
%" quantity="%build
933931
%" unit=blocksPerSecond"
934932
%" }")
935933
blocks
936934

937935
instance ToJSON SyncThroughput where
938-
toJSON (SyncThroughput (MeasuredIn (OldStorage.SyncThroughput (Core.BlockCount blocks)))) =
936+
toJSON (SyncThroughput (MeasuredIn (Core.BlockCount blocks))) =
939937
object [ "quantity" .= toJSON blocks
940938
, "unit" .= String "blocksPerSecond"
941939
]

0 commit comments

Comments
 (0)