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 9c7de3fe594..e91f3946916 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 @@ -1171,7 +1171,7 @@ data ChangeAddressGen s = ChangeAddressGen { -- | Generates a new change address. -- - getChangeAddressGen :: s -> (Address, s) + genChangeAddress :: s -> (Address, s) -- | Returns a /dummy/ change address of the maximum possible length for -- this generator. @@ -1179,7 +1179,7 @@ data ChangeAddressGen s = ChangeAddressGen -- Implementations must satisfy the following property: -- -- @ - -- ∀ s. length (fst (getChangeAddressGen s)) <= + -- ∀ s. length (fst (genChangeAddress s)) <= -- length maxLengthChangeAddress -- @ -- diff --git a/lib/wallet/test/unit/Internal/Cardano/Write/Tx/BalanceSpec.hs b/lib/wallet/test/unit/Internal/Cardano/Write/Tx/BalanceSpec.hs index 821168ed4b6..6e33ff65f47 100644 --- a/lib/wallet/test/unit/Internal/Cardano/Write/Tx/BalanceSpec.hs +++ b/lib/wallet/test/unit/Internal/Cardano/Write/Tx/BalanceSpec.hs @@ -594,7 +594,7 @@ spec_balanceTransaction = describe "balanceTransaction" $ do let expectedChange = fmap Convert.toWalletAddress <$> flip evalState s0 $ replicateM nChange - $ state @Identity (getChangeAddressGen dummyChangeAddrGen) + $ state @Identity (genChangeAddress dummyChangeAddrGen) let address :: Babbage.BabbageTxOut StandardBabbage -> W.Address address (Babbage.BabbageTxOut addr _ _ _) = Convert.toWallet addr @@ -2369,7 +2369,7 @@ costModelsForTesting = either (error . show) id $ do dummyChangeAddrGen :: ChangeAddressGen DummyChangeState dummyChangeAddrGen = ChangeAddressGen - { getChangeAddressGen = \(DummyChangeState i) -> + { genChangeAddress = \(DummyChangeState i) -> (addressAtIx $ toEnum i, DummyChangeState $ succ i) , maxLengthChangeAddress = addressAtIx minBound }