diff --git a/lib/wallet/api/http/Cardano/Wallet/Api/Http/Shelley/Server.hs b/lib/wallet/api/http/Cardano/Wallet/Api/Http/Shelley/Server.hs index 005c89ee61f..ad5dc33b28d 100644 --- a/lib/wallet/api/http/Cardano/Wallet/Api/Http/Shelley/Server.hs +++ b/lib/wallet/api/http/Cardano/Wallet/Api/Http/Shelley/Server.hs @@ -2897,7 +2897,7 @@ constructSharedTransaction withdrawal <- case body ^. #withdrawal of Just SelfWithdraw -> liftIO $ W.mkSelfWithdrawalShared @n - netLayer (txWitnessTagFor @SharedKey) era db + netLayer (txWitnessTagFor @SharedKey) db _ -> pure NoWithdrawal let delegationTemplateM = Shared.delegationTemplate $ getState cp diff --git a/lib/wallet/src/Cardano/Wallet.hs b/lib/wallet/src/Cardano/Wallet.hs index 379598caf60..b0312a1cc74 100644 --- a/lib/wallet/src/Cardano/Wallet.hs +++ b/lib/wallet/src/Cardano/Wallet.hs @@ -1276,15 +1276,14 @@ mkSelfWithdrawalShared :: forall n block . NetworkLayer IO block -> TxWitnessTag - -> AnyCardanoEra -> DBLayer IO (SharedState n SharedKey) -> IO Withdrawal -mkSelfWithdrawalShared netLayer txWitnessTag era db = do +mkSelfWithdrawalShared netLayer txWitnessTag db = do (rewardAccount, _, derivationPath) <- readRewardAccount @(SharedState n SharedKey) db balance <- getCachedRewardAccountBalance netLayer rewardAccount pp <- currentProtocolParameters netLayer - return $ case checkRewardIsWorthTxCost txWitnessTag pp era balance of + return $ case checkRewardIsWorthTxCost txWitnessTag pp balance of Left ErrWithdrawalNotBeneficial -> NoWithdrawal Right () -> WithdrawalSelf rewardAccount derivationPath balance