diff --git a/lib/core/src/Cardano/Wallet/Api/Server.hs b/lib/core/src/Cardano/Wallet/Api/Server.hs index 1d3ce51f752..b05a473650c 100644 --- a/lib/core/src/Cardano/Wallet/Api/Server.hs +++ b/lib/core/src/Cardano/Wallet/Api/Server.hs @@ -491,7 +491,7 @@ instance LiftHandler ErrSignTx where ErrSignTx ErrInvalidTx -> apiError err403 CreatedInvalidTransaction $ mconcat [ "I can't process this payment because transactions" - , " with 0 amount are not supported in Shelley." + , " with 0 amount are not supported in Byron." ] ErrSignTxNoSuchWallet e -> (handler e) { errHTTPCode = 410 diff --git a/lib/core/test/integration/Test/Integration/Framework/TestData.hs b/lib/core/test/integration/Test/Integration/Framework/TestData.hs index 6dd24715580..47e5808f7b5 100644 --- a/lib/core/test/integration/Test/Integration/Framework/TestData.hs +++ b/lib/core/test/integration/Test/Integration/Framework/TestData.hs @@ -223,7 +223,7 @@ errMsg403NotEnoughMoney has needs = "I can't process this payment because there' errMsg403InvalidTransaction :: String errMsg403InvalidTransaction = "I can't process this payment because transactions\ - \ with 0 amount are not supported in Shelley." + \ with 0 amount are not supported in Byron." errMsg403UTxO :: String errMsg403UTxO = "When creating new transactions, I'm not able to re-use the\ diff --git a/lib/http-bridge/src/Cardano/Wallet/HttpBridge/Transaction.hs b/lib/http-bridge/src/Cardano/Wallet/HttpBridge/Transaction.hs index 479a386e800..a86e66aa23e 100644 --- a/lib/http-bridge/src/Cardano/Wallet/HttpBridge/Transaction.hs +++ b/lib/http-bridge/src/Cardano/Wallet/HttpBridge/Transaction.hs @@ -32,7 +32,7 @@ import Cardano.Wallet.Primitive.Types import Cardano.Wallet.Transaction ( ErrMkStdTx (..), TransactionLayer (..) ) import Control.Monad - ( forM, when ) + ( forM, unless ) import Data.ByteString ( ByteString ) import Data.Either.Combinators @@ -54,7 +54,7 @@ newTransactionLayer = TransactionLayer { mkStdTx = \keyFrom inps outs -> do let ins = (fmap fst inps) let tx = Tx ins outs - when (not . null $ filter (\(TxOut _ c) -> c == Coin 0) outs) + unless (not (any (\ (TxOut _ c) -> c == Coin 0) outs)) $ Left ErrInvalidTx -- Not working, maybe we need to make TransactionLayer polymorphic let txSigData = txId @(HttpBridge n) tx