Skip to content

Commit

Permalink
rm unneeded errors from ErrBalanceTx
Browse files Browse the repository at this point in the history
  • Loading branch information
paweljakubas committed Oct 20, 2021
1 parent 6aed605 commit faaa3b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
6 changes: 2 additions & 4 deletions lib/core/src/Cardano/Wallet.hs
Expand Up @@ -2601,10 +2601,8 @@ data ErrSignPayment
deriving (Show, Eq)

-- | Errors that can occur when balancing transaction.
data ErrBalanceTx
= ErrBalanceTxTxAlreadyBalanced
| ErrBalanceTxUpdateError ErrUpdateSealedTx
| ErrBalanceTxNotImplemented
newtype ErrBalanceTx
= ErrBalanceTxUpdateError ErrUpdateSealedTx
deriving (Show, Eq)

-- | Errors that can occur when constructing an unsigned transaction.
Expand Down
8 changes: 0 additions & 8 deletions lib/core/src/Cardano/Wallet/Api/Server.hs
Expand Up @@ -3919,11 +3919,6 @@ instance IsServerError ErrDecodeTx where

instance IsServerError ErrBalanceTx where
toServerError = \case
ErrBalanceTxTxAlreadyBalanced ->
apiError err403 TransactionAlreadyBalanced $ mconcat
[ "The transaction is already balanced. "
, "Please send a transaction that requires more inputs/outputs to be picked to be balanced."
]
ErrBalanceTxUpdateError ErrByronTxNotSupported ->
apiError err403 CreatedInvalidTransaction
"Balancing Byron transactions is not supported."
Expand All @@ -3935,9 +3930,6 @@ instance IsServerError ErrBalanceTx where
, "the transaction body is modified. "
, "Please sign the transaction after it is balanced instead."
]
ErrBalanceTxNotImplemented ->
apiError err501 NotImplemented
"This feature is not yet implemented."

instance IsServerError ErrMintBurnAssets where
toServerError = \case
Expand Down

0 comments on commit faaa3b8

Please sign in to comment.