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

Commit 3674fc2

Browse files
committed
Merge pull request #3688 from input-output-hk/matt/co-405/remove-from-api-types
[CO-405] Remove old wallet code from API.V1.Types
2 parents 402c0ff + 107b251 commit 3674fc2

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
@@ -202,8 +202,6 @@ import Pos.Infra.Util.LogSafe (BuildableSafeGen (..), SecureLog (..),
202202
buildSafe, buildSafeList, buildSafeMaybe,
203203
deriveSafeBuildable, plainOrSecureF)
204204
import Pos.Util.Servant (Flaggable (..))
205-
import Pos.Wallet.Web.ClientTypes.Instances ()
206-
import qualified Pos.Wallet.Web.State.Storage as OldStorage
207205
import Test.Pos.Core.Arbitrary ()
208206

209207

@@ -928,31 +926,31 @@ instance ToSchema EstimatedCompletionTime where
928926
)
929927
)
930928

931-
932-
newtype SyncThroughput = SyncThroughput (MeasuredIn 'BlocksPerSecond OldStorage.SyncThroughput)
929+
newtype SyncThroughput
930+
= SyncThroughput (MeasuredIn 'BlocksPerSecond Core.BlockCount)
933931
deriving (Show, Eq)
934932

935933
mkSyncThroughput :: Core.BlockCount -> SyncThroughput
936-
mkSyncThroughput = SyncThroughput . MeasuredIn . OldStorage.SyncThroughput
934+
mkSyncThroughput = SyncThroughput . MeasuredIn
937935

938936
instance Ord SyncThroughput where
939-
compare (SyncThroughput (MeasuredIn (OldStorage.SyncThroughput (Core.BlockCount b1))))
940-
(SyncThroughput (MeasuredIn (OldStorage.SyncThroughput (Core.BlockCount b2)))) =
937+
compare (SyncThroughput (MeasuredIn (Core.BlockCount b1)))
938+
(SyncThroughput (MeasuredIn (Core.BlockCount b2))) =
941939
compare b1 b2
942940

943941
instance Arbitrary SyncThroughput where
944-
arbitrary = SyncThroughput . MeasuredIn . OldStorage.SyncThroughput <$> arbitrary
942+
arbitrary = SyncThroughput . MeasuredIn <$> arbitrary
945943

946944
deriveSafeBuildable ''SyncThroughput
947945
instance BuildableSafeGen SyncThroughput where
948-
buildSafeGen _ (SyncThroughput (MeasuredIn (OldStorage.SyncThroughput (Core.BlockCount blocks)))) = bprint ("{"
946+
buildSafeGen _ (SyncThroughput (MeasuredIn (Core.BlockCount blocks))) = bprint ("{"
949947
%" quantity="%build
950948
%" unit=blocksPerSecond"
951949
%" }")
952950
blocks
953951

954952
instance ToJSON SyncThroughput where
955-
toJSON (SyncThroughput (MeasuredIn (OldStorage.SyncThroughput (Core.BlockCount blocks)))) =
953+
toJSON (SyncThroughput (MeasuredIn (Core.BlockCount blocks))) =
956954
object [ "quantity" .= toJSON blocks
957955
, "unit" .= String "blocksPerSecond"
958956
]

0 commit comments

Comments
 (0)