Skip to content

Commit 452d940

Browse files
committed
small cleanup
1 parent 690dfb0 commit 452d940

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/BotPlutusInterface/Types.hs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ module BotPlutusInterface.Types (
2121
SpendBudgets,
2222
MintBudgets,
2323
ContractStats (..),
24-
emptyStats,
2524
addBudget,
2625
) where
2726

@@ -108,14 +107,6 @@ data TxFile
108107
| -- | for using with ".signed" files
109108
Signed !FilePath
110109

111-
-- TODO; maybe, Monoid instance could be handy later
112-
emptyStats :: ContractStats
113-
emptyStats = ContractStats mempty
114-
115-
addBudget :: TxId -> TxBudget -> ContractStats -> ContractStats
116-
addBudget txId budget stats =
117-
stats {estimatedBudgets = Map.insert txId budget (estimatedBudgets stats)}
118-
119110
-- | Result of budget estimation
120111
data TxBudget = TxBudget
121112
{ -- | budgets for spending inputs
@@ -125,6 +116,11 @@ data TxBudget = TxBudget
125116
}
126117
deriving stock (Show)
127118

119+
addBudget :: TxId -> TxBudget -> ContractStats -> ContractStats
120+
addBudget txId budget stats =
121+
stats {estimatedBudgets = Map.insert txId budget (estimatedBudgets stats)}
122+
123+
128124
instance Semigroup TxBudget where
129125
TxBudget s m <> TxBudget s' m' = TxBudget (s <> s') (m <> m')
130126

0 commit comments

Comments
 (0)