@@ -50,34 +50,28 @@ import Control.Lens (Getter, to, view)
50
50
import Control.Monad.Reader (ask )
51
51
import Control.Monad.Trans (MonadIO )
52
52
import Data.Acid (EventResult , EventState , Query ,
53
- QueryEvent , UpdateEvent ,
54
- makeAcidic )
53
+ QueryEvent , UpdateEvent , makeAcidic )
55
54
import Data.Aeson (encode , object , (.=) )
55
+ import Data.ByteString.Lazy.Char8 as BS hiding (filter , map )
56
56
import Data.Maybe (fromMaybe )
57
57
import qualified Data.Set as Set
58
58
import Data.Text (Text )
59
- import Data.ByteString.Lazy.Char8 as BS hiding (map , filter )
60
59
import Formatting (bprint , stext , (%) )
61
60
import Safe (headMay )
62
61
63
- import Serokell.AcidState (ExtendedState ,
64
- closeExtendedState ,
62
+ import Serokell.AcidState (ExtendedState , closeExtendedState ,
65
63
openLocalExtendedState ,
66
- openMemoryExtendedState ,
67
- queryExtended ,
68
- tidyExtendedState ,
69
- updateExtended )
70
- import Serokell.AcidState.Statistics (StoragePart (.. ),
71
- estimateMemoryUsage )
64
+ openMemoryExtendedState , queryExtended ,
65
+ tidyExtendedState , updateExtended )
66
+ import Serokell.AcidState.Statistics (StoragePart (.. ), estimateMemoryUsage )
72
67
import Serokell.Data.Memory.Units (Byte , memory )
73
68
import Serokell.Util.Text (listBuilderJSONIndent , show' )
74
69
75
- import RSCoin.Core (ActionLog ,
76
- AddressToTxStrategyMap ,
77
- Explorer , Explorers , HBlock ,
78
- MintetteId , Mintettes , PeriodId ,
79
- PublicKey )
70
+ import RSCoin.Core (ActionLog , AddressToTxStrategyMap ,
71
+ Explorer , Explorers , HBlock , MintetteId ,
72
+ Mintettes , PeriodId , PublicKey )
80
73
import qualified RSCoin.Core as C
74
+ import RSCoin.Core.AesonJS (utxoAsBalances )
81
75
82
76
import qualified RSCoin.Bank.Storage as BS
83
77
@@ -184,7 +178,7 @@ dumpUtxo fp outputFp = do
184
178
state <- openState False fp
185
179
utxo <- query state GetUtxo
186
180
BS. writeFile outputFp . encode $ object
187
- [ " utxo" .= utxo
181
+ [ " utxo" .= utxoAsBalances utxo
188
182
]
189
183
pure ()
190
184
0 commit comments