diff --git a/src/Cardano/Wallet/Primitive/AddressDiscovery.hs b/src/Cardano/Wallet/Primitive/AddressDiscovery.hs index a42cc36fea1..5fcea7ed3c0 100644 --- a/src/Cardano/Wallet/Primitive/AddressDiscovery.hs +++ b/src/Cardano/Wallet/Primitive/AddressDiscovery.hs @@ -146,10 +146,6 @@ data AddressPool = AddressPool instance NFData AddressPool -instance Semigroup AddressPool where - (AddressPool !pubKey !g !change !a1) <> (AddressPool _ _ _ !a2) = - AddressPool pubKey g change (a1 <> a2) - -- | Get all addresses in the pool, sorted from the first address discovered, -- up until the next one. -- @@ -232,7 +228,7 @@ nextAddresses !key (AddressPoolGap !g) !cc !fromIx = newtype SeqState = SeqState (AddressPool, AddressPool) deriving stock (Generic, Show) - deriving newtype (NFData, Semigroup) + deriving newtype (NFData) -- NOTE -- We have to scan both the internal and external chain. Note that, the diff --git a/src/Cardano/Wallet/Primitive/Model.hs b/src/Cardano/Wallet/Primitive/Model.hs index 0e0ffce430b..7c41dac7341 100644 --- a/src/Cardano/Wallet/Primitive/Model.hs +++ b/src/Cardano/Wallet/Primitive/Model.hs @@ -118,7 +118,7 @@ import qualified Data.Text as T -- - TODO: Known & used addresses data Wallet s where Wallet - :: (IsOurs s, Semigroup s, NFData s, Show s) + :: (IsOurs s, NFData s, Show s) => UTxO -> Set Tx -> SlotId @@ -138,7 +138,7 @@ instance NFData (Wallet s) where -- | Create an empty wallet from an initial state initWallet - :: (IsOurs s, Semigroup s, NFData s, Show s) + :: (IsOurs s, NFData s, Show s) => s -> Wallet s initWallet = Wallet mempty mempty (SlotId 0 0)