Skip to content

Commit

Permalink
Rename and export 'updateTxSet'
Browse files Browse the repository at this point in the history
  • Loading branch information
HeinrichApfelmus authored and paolino committed Nov 29, 2022
1 parent 1a608b6 commit dd7363e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/Store.hs
Expand Up @@ -16,6 +16,7 @@ Implementation of a 'Store' for 'TxSet'.
module Cardano.Wallet.DB.Store.Transactions.Store
( selectTxSet
, putTxSet
, updateTxSet
, mkStoreTransactions
, mkDBTxSet
, DBTxSet (..)
Expand Down Expand Up @@ -87,11 +88,11 @@ mkStoreTransactions =
Store
{ loadS = Right <$> selectTxSet
, writeS = write
, updateS = const update
, updateS = const updateTxSet
}

update :: DeltaTxSet -> SqlPersistT IO ()
update change = case change of
updateTxSet :: DeltaTxSet -> SqlPersistT IO ()
updateTxSet change = case change of
Append txs -> putTxSet txs
DeleteTx tid -> do
deleteWhere [TxInputTxId ==. tid ]
Expand Down

0 comments on commit dd7363e

Please sign in to comment.