From 6564b899fe1aab7f82bc4ba3a69f31f71a6bc42f Mon Sep 17 00:00:00 2001 From: Johannes Lund Date: Thu, 19 Dec 2024 12:52:08 +0100 Subject: [PATCH] Drop unused `ErrBalanceTxConflictingNetworks` --- lib/api/src/Cardano/Wallet/Api/Http/Server/Error.hs | 6 ------ .../lib/internal/Internal/Cardano/Write/Tx/Balance.hs | 1 - .../test/spec/Internal/Cardano/Write/Tx/BalanceSpec.hs | 2 -- 3 files changed, 9 deletions(-) diff --git a/lib/api/src/Cardano/Wallet/Api/Http/Server/Error.hs b/lib/api/src/Cardano/Wallet/Api/Http/Server/Error.hs index 6203e2a7213..00e3c081e8e 100644 --- a/lib/api/src/Cardano/Wallet/Api/Http/Server/Error.hs +++ b/lib/api/src/Cardano/Wallet/Api/Http/Server/Error.hs @@ -606,12 +606,6 @@ instance (Write.IsRecentEra era, IsServerError (ErrAssignRedeemers era)) TokenBundle shortfallAda shortfallAssets = toWalletTokenBundle $ e ^. #shortfall ErrBalanceTxAssignRedeemers err -> toServerError err - ErrBalanceTxConflictingNetworks -> - apiError err403 BalanceTxConflictingNetworks $ T.unwords - [ "There are withdrawals for multiple networks (e.g. both" - , "mainnet and testnet) in the provided transaction. This" - , "makes no sense, and I'm confused." - ] ErrBalanceTxExistingCollateral -> apiError err403 BalanceTxExistingCollateral "I cannot balance transactions with pre-defined collateral." diff --git a/lib/balance-tx/lib/internal/Internal/Cardano/Write/Tx/Balance.hs b/lib/balance-tx/lib/internal/Internal/Cardano/Write/Tx/Balance.hs index 786603bc688..3c1e9994ee6 100644 --- a/lib/balance-tx/lib/internal/Internal/Cardano/Write/Tx/Balance.hs +++ b/lib/balance-tx/lib/internal/Internal/Cardano/Write/Tx/Balance.hs @@ -395,7 +395,6 @@ data ErrBalanceTx era | ErrBalanceTxExistingReturnCollateral | ErrBalanceTxInsufficientCollateral (ErrBalanceTxInsufficientCollateralError era) - | ErrBalanceTxConflictingNetworks | ErrBalanceTxAssignRedeemers (ErrAssignRedeemers era) | ErrBalanceTxInternalError (ErrBalanceTxInternalError era) | ErrBalanceTxInputResolutionConflicts diff --git a/lib/balance-tx/test/spec/Internal/Cardano/Write/Tx/BalanceSpec.hs b/lib/balance-tx/test/spec/Internal/Cardano/Write/Tx/BalanceSpec.hs index 323fa2938a6..7cc818ac72b 100644 --- a/lib/balance-tx/test/spec/Internal/Cardano/Write/Tx/BalanceSpec.hs +++ b/lib/balance-tx/test/spec/Internal/Cardano/Write/Tx/BalanceSpec.hs @@ -1356,8 +1356,6 @@ prop_balanceTxValid label "existing collateral return outputs" True Left ErrBalanceTxMaxSizeLimitExceeded -> label "maxTxSize limit exceeded" $ property True - Left ErrBalanceTxConflictingNetworks -> - label "conflicting networks" $ property True Left ErrBalanceTxUnableToCreateInput -> label "unable to create input" $ property True Left (ErrBalanceTxInternalError