Skip to content

Commit

Permalink
Partially resolve TODO about plutus failure
Browse files Browse the repository at this point in the history
  • Loading branch information
v0d1ch authored and ch1bo committed Feb 6, 2023
1 parent ad85e5e commit af925a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions hydra-node/src/Hydra/Chain/Direct/Handlers.hs
Expand Up @@ -133,11 +133,11 @@ finalizeTx TinyWallet{sign, coverFee} ctx ChainStateAt{chainState} partialTx = d
throwIO (NoFuelUTXOFound :: PostTxError Tx)
Left ErrNotEnoughFunds{} ->
throwIO (NotEnoughFuel :: PostTxError Tx)
Left ErrScriptExecutionFailed{} ->
Left ErrScriptExecutionFailed{scriptFailure} ->
throwIO
( PlutusValidationFailed
{ plutusFailure = "" -- TODO: extract this
, plutusDebugInfo = "" -- TODO: extract this or keep empty or defina new error type
{ plutusFailure = show $ snd scriptFailure
, plutusDebugInfo = ""
} ::
PostTxError Tx
)
Expand Down
2 changes: 1 addition & 1 deletion hydra-node/src/Hydra/Chain/Direct/Wallet.hs
Expand Up @@ -217,7 +217,7 @@ data ErrCoverFee
= ErrNotEnoughFunds ChangeError
| ErrNoFuelUTxOFound
| ErrUnknownInput {input :: TxIn}
| ErrScriptExecutionFailed (RdmrPtr, TransactionScriptFailure StandardCrypto)
| ErrScriptExecutionFailed {scriptFailure :: (RdmrPtr, TransactionScriptFailure StandardCrypto)}
| ErrTranslationError (TranslationError StandardCrypto)
deriving (Show)

Expand Down

0 comments on commit af925a4

Please sign in to comment.