@@ -52,8 +52,9 @@ import Formatting (bprint, build, (%))
52
52
import qualified Formatting.Buildable
53
53
import Test.QuickCheck (Arbitrary (.. ), oneof )
54
54
55
- import Pos.Chain.Txp (Utxo , getTotalCoinsInUtxo )
56
- import Pos.Core (FlatSlotId , SlotCount , SlotId , flattenSlotIdExplicit )
55
+ import Pos.Chain.Txp (Utxo )
56
+ import Pos.Core (FlatSlotId , SlotCount , SlotId , flattenSlotIdExplicit ,
57
+ mkCoin )
57
58
import Pos.Core.Chrono (NewestFirst (.. ), OldestFirst (.. ))
58
59
import Pos.Core.Txp (TxAux , TxId )
59
60
@@ -74,6 +75,7 @@ import Cardano.Wallet.Kernel.NodeStateAdaptor (SecurityParameter (..))
74
75
import Cardano.Wallet.Kernel.PrefilterTx (AddrWithId ,
75
76
PrefilteredBlock (.. ), emptyPrefilteredBlock )
76
77
import Cardano.Wallet.Kernel.Util (markMissingMapEntries )
78
+ import Cardano.Wallet.Kernel.Util.Core (utxoBalance )
77
79
78
80
{- ------------------------------------------------------------------------------
79
81
Top-level database
@@ -452,7 +454,7 @@ restoreHdWallet newRoot slotId utxoByAccount =
452
454
tipCheckpoint :: Utxo -> PartialCheckpoint
453
455
tipCheckpoint utxo = PartialCheckpoint
454
456
{ _pcheckpointUtxo = InDb utxo
455
- , _pcheckpointUtxoBalance = InDb (getTotalCoinsInUtxo utxo)
457
+ , _pcheckpointUtxoBalance = InDb . mkCoin . fromIntegral . utxoBalance $ utxo
456
458
, _pcheckpointPending = Pending. empty
457
459
, _pcheckpointBlockMeta = emptyLocalBlockMeta -- TODO (@mn): is this right?
458
460
, _pcheckpointSlotId = InDb slotId
0 commit comments