diff --git a/lib/core/test/unit/Cardano/Wallet/Primitive/AddressDiscovery/SequentialSpec.hs b/lib/core/test/unit/Cardano/Wallet/Primitive/AddressDiscovery/SequentialSpec.hs index 8c08167567a..66b466b2abd 100644 --- a/lib/core/test/unit/Cardano/Wallet/Primitive/AddressDiscovery/SequentialSpec.hs +++ b/lib/core/test/unit/Cardano/Wallet/Primitive/AddressDiscovery/SequentialSpec.hs @@ -26,7 +26,9 @@ import Cardano.Wallet.Primitive.AddressDerivation ( AccountingStyle (..) , DelegationAddress (..) , Depth (..) + , DerivationType (..) , HardDerivation (..) + , Index , KeyFingerprint , MkKeyFingerprint (..) , NetworkDiscriminant (..) @@ -103,7 +105,6 @@ import Test.QuickCheck , Positive (..) , Property , arbitraryBoundedEnum - , arbitraryBoundedEnum , checkCoverage , choose , classify @@ -144,6 +145,9 @@ spec = do it "defaultAddressPoolGap is valid" (property prop_defaultValid) + describe "DerivationPrefix" $ do + textRoundtrip (Proxy @DerivationPrefix) + let styles = [ Style (Proxy @'UTxOExternal) , Style (Proxy @'UTxOInternal) @@ -640,6 +644,16 @@ instance Arbitrary AddressState where shrink _ = [] arbitrary = genericArbitrary +instance Arbitrary DerivationPrefix where + arbitrary = fmap DerivationPrefix $ (,,) + <$> arbitrary + <*> arbitrary + <*> arbitrary + +instance Arbitrary (Index 'Hardened depth) where + shrink _ = [] + arbitrary = arbitraryBoundedEnum + -- | In this context, Arbitrary addresses are either some known addresses -- derived from "our account key", or they just are some arbitrary addresses -- that are unknown to us.