Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev. Deposit op fix #101

Open
wants to merge 1 commit into
base: DEV-1102_wallet-api-path-delimiter
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions submit-api/src/SubmitAPI/Internal/Balancing.hs
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,11 @@ makeTransactionBodyAutoBalance eraInMode systemstart history pparams
:: TxOut CtxTx era
-> ProtocolParameters
-> Either TxBodyErrorAutoBalance ()
checkMinUTxOValue txout@(TxOut _ v _ _) pparams' = do
checkMinUTxOValue txout@(TxOut addr v _ _) pparams' = do
minUTxO <- first TxBodyErrorMinUTxOMissingPParams
$ calculateMinimumUTxO era txout pparams'
if txOutValueToLovelace v >= selectLovelace minUTxO
let chargeBoxWillBeMerged = addr == changeaddr
if txOutValueToLovelace v >= selectLovelace minUTxO || chargeBoxWillBeMerged
then Right ()
else Left TxBodyErrorMissingParamMinUTxO --todo fix: TxOutInAnyEra. Current err is incorrect

Expand Down