diff --git a/lib/wallet/src/Cardano/Wallet.hs b/lib/wallet/src/Cardano/Wallet.hs index 4008897a1b3..57ac38873f2 100644 --- a/lib/wallet/src/Cardano/Wallet.hs +++ b/lib/wallet/src/Cardano/Wallet.hs @@ -1879,19 +1879,17 @@ readNodeTipStateForTxWrite :: NetworkLayer IO Read.Block -> IO (Write.InAnyRecentEra Write.ProtocolParameters, TimeTranslation) readNodeTipStateForTxWrite netLayer = do - let ti = timeInterpreter netLayer - timeTranslation <- toTimeTranslation ti + timeTranslation <- toTimeTranslation (timeInterpreter netLayer) res <- currentLedgerProtocolParameters <$> currentProtocolParameters netLayer case Write.toRecentEraGADT res of - Right pp -> - pure (pp, timeTranslation) + Right pp -> pure (pp, timeTranslation) Left era -> throwIO $ invalidEra era where - invalidEra = ExceptionWriteTxEra - . ErrNodeNotYetInRecentEra + invalidEra = + ExceptionWriteTxEra . ErrNodeNotYetInRecentEra -- | Build, Sign, Submit transaction. -- @@ -2017,7 +2015,14 @@ buildAndSignTransactionPure wallet <- get (unsignedBalancedTx, updatedWalletState) <- lift $ buildTransactionPure @s @era - wallet timeTranslation utxoIndex txLayer changeAddrGen pp preSelection txCtx + wallet + timeTranslation + utxoIndex + txLayer + changeAddrGen + pp + preSelection + txCtx put wallet { getState = updatedWalletState } let mExternalRewardAccount = case view #txWithdrawal txCtx of diff --git a/lib/wallet/src/Cardano/Wallet/Shelley/Compatibility.hs b/lib/wallet/src/Cardano/Wallet/Shelley/Compatibility.hs index 7012d74ed40..5b3ee6771eb 100644 --- a/lib/wallet/src/Cardano/Wallet/Shelley/Compatibility.hs +++ b/lib/wallet/src/Cardano/Wallet/Shelley/Compatibility.hs @@ -894,7 +894,6 @@ fromShelleyPParams eraInfo pp = , minimumCollateralPercentage = 0 , executionUnitPrices = Nothing , currentLedgerProtocolParameters = Write.InNonRecentEraShelley - } fromAllegraPParams diff --git a/lib/wallet/src/Cardano/Wallet/Write/ProtocolParameters.hs b/lib/wallet/src/Cardano/Wallet/Write/ProtocolParameters.hs index 64ee7f5b989..473056d8b39 100644 --- a/lib/wallet/src/Cardano/Wallet/Write/ProtocolParameters.hs +++ b/lib/wallet/src/Cardano/Wallet/Write/ProtocolParameters.hs @@ -25,6 +25,9 @@ newtype ProtocolParameters era = ProtocolParameters :: Write.PParams (Write.ShelleyLedgerEra era) } -deriving instance Eq (Write.PParams (Write.ShelleyLedgerEra era)) => Eq (ProtocolParameters era) -deriving instance Show (Write.PParams (Write.ShelleyLedgerEra era)) => Show (ProtocolParameters era) - +deriving instance + Eq (Write.PParams (Write.ShelleyLedgerEra era)) => + Eq (ProtocolParameters era) +deriving instance + Show (Write.PParams (Write.ShelleyLedgerEra era)) => + Show (ProtocolParameters era)