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

Commit b10ede9

Browse files
committed
[DAE-111] Fix build in cardano-sl-0.2
1 parent 857b31c commit b10ede9

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

src/Pos/Wallet/WalletMode.hs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ import Pos.Txp.Class (getMemPool, getUtxoView)
4949
import qualified Pos.Txp.Holder as Modern
5050
import Pos.Txp.Logic (processTx)
5151
import Pos.Txp.Types (UtxoView (..), localTxs)
52-
import Pos.Types (Address, BlockHeader, ChainDifficulty, Coin,
52+
import Pos.Types (Address, BlockHeader, ChainDifficulty, Coin, HeaderHash,
5353
TxAux, TxId, Utxo, difficultyL,
5454
evalUtxoStateT, flattenEpochOrSlot,
5555
flattenSlotId, prevBlockL, runUtxoStateT,
@@ -126,7 +126,7 @@ class Monad m => MonadTxHistory m where
126126
default getTxHistory
127127
:: (MonadTrans t, MonadTxHistory m', t m' ~ m)
128128
=> Address -> Maybe (HeaderHash, Utxo) -> m TxHistoryAnswer
129-
getTxHistory = fmap (fmap lift) <$> getTxHistory
129+
getTxHistory addr = lift . getTxHistory addr
130130

131131
default saveTx :: (MonadTrans t, MonadTxHistory m', t m' ~ m) => (TxId, TxAux) -> m ()
132132
saveTx = lift . saveTx
@@ -149,7 +149,7 @@ deriving instance MonadTxHistory m => MonadTxHistory (WalletWebDB m)
149149

150150
-- | Get tx history for Address
151151
instance MonadIO m => MonadTxHistory (WalletDB m) where
152-
getTxHistory addr = do
152+
getTxHistory addr _ = do
153153
chain <- WS.getBestChain
154154
utxo <- WS.getOldestUtxo
155155
res <- fmap (fst . fromMaybe (panic "deriveAddrHistory: Nothing")) $
@@ -158,10 +158,9 @@ instance MonadIO m => MonadTxHistory (WalletDB m) where
158158
pure undefined
159159
saveTx _ = pure ()
160160

161-
instance (SscHelpersClass ssc, MonadDB ssc m, MonadThrow m, WithLogger m)
161+
instance (SscHelpersClass ssc, MonadDB ssc m, MonadThrow m, WithLogger m, PC.WithNodeContext ssc m)
162162
=> MonadTxHistory (Modern.TxpLDHolder ssc m) where
163163
getTxHistory addr mInit = do
164-
bot <- maybe GS.getBot pure mbot
165164
tip <- GS.getTip
166165

167166
let getGenUtxo = filterUtxoByAddr addr . PC.ncGenesisUtxo <$> PC.getNodeContext

src/Pos/Wallet/Web/State/State.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ import Mockable (MonadMockable)
3838
import Universum
3939

4040
import Pos.Slotting (NtpSlotting)
41-
import Pos.Txp (Utxo)
42-
import Pos.Types (HeaderHash)
41+
import Pos.Types (HeaderHash, Utxo)
4342
import Pos.Wallet.Web.ClientTypes (CAddress, CHash, CProfile, CTx, CTxId,
4443
CTxMeta, CUpdateInfo, CWalletMeta)
4544
import Pos.Wallet.Web.State.Acidic (WalletState, closeState, openMemState,

src/Pos/Wallet/Web/State/Storage.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ module Pos.Wallet.Web.State.Storage
3030
import Control.Lens (at, ix, makeClassy, (%=), (.=), _Just, _head)
3131
import Data.Default (Default, def)
3232
import Data.SafeCopy (base, deriveSafeCopySimple)
33-
import Pos.Txp (Utxo)
34-
import Pos.Types (HeaderHash)
33+
import Pos.Types (HeaderHash, Utxo)
3534
import Pos.Wallet.Web.ClientTypes (CAddress, CCurrency, CHash, CProfile, CTType,
3635
CTx, CTxId, CTxMeta, CUpdateInfo,
3736
CWalletMeta, CWalletType)

0 commit comments

Comments
 (0)