Skip to content

Commit

Permalink
remove unused 'DummyState' and its 'PersistState' instance
Browse files Browse the repository at this point in the history
  • Loading branch information
KtorZ committed Jun 6, 2019
1 parent 7a9a458 commit b5aeff8
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions lib/core/src/Cardano/Wallet/DB/Sqlite.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE LambdaCase #-}
Expand All @@ -19,7 +18,6 @@
module Cardano.Wallet.DB.Sqlite
( newDBLayer
, PersistState (..)
, DummyState(..)
) where

import Prelude
Expand Down Expand Up @@ -121,8 +119,6 @@ import Database.Persist.Sqlite
( SqlBackend, SqlPersistM, SqlPersistT, wrapConnection )
import Database.Sqlite
( Error (ErrorConstraint), SqliteException (SqliteException) )
import GHC.Generics
( Generic )
import System.IO
( stderr )
import System.Log.FastLogger
Expand Down Expand Up @@ -767,12 +763,3 @@ selectSeqStatePendingIxs ssid =
[Desc SeqStatePendingIxIndex]
where
fromRes = fmap (W.Index . seqStatePendingIxIndex . entityVal)

data DummyState = DummyState
deriving (Show, Eq, Generic)

instance PersistState DummyState where
insertState (wid, sl) _ = insert_ (SeqState wid sl)
selectState (wid, sl) = fmap (const DummyState) <$>
selectFirst [SeqStateTableWalletId ==. wid, SeqStateTableCheckpointSlot ==. sl] []
deleteState wid = deleteWhere [SeqStateTableWalletId ==. wid]

0 comments on commit b5aeff8

Please sign in to comment.