diff --git a/cabal.project b/cabal.project index af6ea17..2ea71b1 100644 --- a/cabal.project +++ b/cabal.project @@ -71,8 +71,8 @@ source-repository-package source-repository-package type: git location: https://github.com/geniusyield/atlas - tag: 80ce2b5ecab27388c1093cf9f5d4f48fa30fd9bf - --sha256: sha256-WM/G0dlSuRD7oZZxwir4InpD+hxoLHhwHeEW0tKS12M= + tag: b64a026631be19c9cc8448c7a0670b0ad24b9b51 + --sha256: sha256-CdXih/AGDelOqrvNPzJXMrH/EYL1T9cZjNVoQqoQmDI= source-repository-package type: git diff --git a/geniusyield-market-maker/src/GeniusYield/MarketMaker/MakerBotConfig.hs b/geniusyield-market-maker/src/GeniusYield/MarketMaker/MakerBotConfig.hs index c14df7d..932a2bc 100644 --- a/geniusyield-market-maker/src/GeniusYield/MarketMaker/MakerBotConfig.hs +++ b/geniusyield-market-maker/src/GeniusYield/MarketMaker/MakerBotConfig.hs @@ -34,7 +34,7 @@ data MakerBotConfig = MakerBotConfig mbcPriceConfig ∷ !PriceConfig } deriving stock (Show, Generic) - deriving (FromJSON, ToJSON) via CustomJSON '[FieldLabelModifier '[CamelToSnake]] MakerBotConfig + deriving (FromJSON) via CustomJSON '[FieldLabelModifier '[CamelToSnake]] MakerBotConfig instance FromEnv MakerBotConfig where fromEnv _ = diff --git a/geniusyield-market-maker/src/GeniusYield/MarketMaker/Orphans.hs b/geniusyield-market-maker/src/GeniusYield/MarketMaker/Orphans.hs index 81a0559..afd5c72 100644 --- a/geniusyield-market-maker/src/GeniusYield/MarketMaker/Orphans.hs +++ b/geniusyield-market-maker/src/GeniusYield/MarketMaker/Orphans.hs @@ -2,14 +2,11 @@ module GeniusYield.MarketMaker.Orphans where -import Deriving.Aeson -import GeniusYield.Api.Dex.PartialOrder (PORefs (..)) -import GeniusYield.GYConfig (Confidential (..)) +import Deriving.Aeson +import GeniusYield.Api.Dex.PartialOrder (PORefs (..)) deriving stock instance Generic PORefs deriving via CustomJSON '[FieldLabelModifier '[CamelToSnake]] PORefs instance (FromJSON PORefs) deriving via CustomJSON '[FieldLabelModifier '[CamelToSnake]] PORefs instance (ToJSON PORefs) - -deriving newtype instance ToJSON a ⇒ ToJSON (Confidential a) diff --git a/geniusyield-market-maker/src/GeniusYield/MarketMaker/Prices.hs b/geniusyield-market-maker/src/GeniusYield/MarketMaker/Prices.hs index 03e9580..fce9787 100644 --- a/geniusyield-market-maker/src/GeniusYield/MarketMaker/Prices.hs +++ b/geniusyield-market-maker/src/GeniusYield/MarketMaker/Prices.hs @@ -88,7 +88,7 @@ data PriceConfig = PriceConfig pcOverride ∷ !(Maybe MaestroPairOverride) } deriving stock (Show, Generic) - deriving (FromJSON, ToJSON) via CustomJSON '[FieldLabelModifier '[CamelToSnake]] PriceConfig + deriving (FromJSON) via CustomJSON '[FieldLabelModifier '[CamelToSnake]] PriceConfig data MaestroPP = MaestroPP { mppEnv ∷ !(MaestroEnv 'V1), diff --git a/geniusyield-market-maker/src/GeniusYield/MarketMaker/User.hs b/geniusyield-market-maker/src/GeniusYield/MarketMaker/User.hs index 4829562..0a13e82 100644 --- a/geniusyield-market-maker/src/GeniusYield/MarketMaker/User.hs +++ b/geniusyield-market-maker/src/GeniusYield/MarketMaker/User.hs @@ -1,29 +1,8 @@ module GeniusYield.MarketMaker.User where -import Data.Aeson (withText) import Deriving.Aeson -import GeniusYield.Imports import GeniusYield.Types --- TODO: Move to Atlas. -newtype GYStakeAddressBech32 = GYStakeAddressBech32 GYStakeAddress - deriving newtype (Show, Eq, Ord) - -stakeAddressToBech32 :: GYStakeAddress -> GYStakeAddressBech32 -stakeAddressToBech32 = coerce - -stakeAddressFromBech32 :: GYStakeAddressBech32 -> GYStakeAddress -stakeAddressFromBech32 = coerce - -instance ToJSON GYStakeAddressBech32 where - toJSON (GYStakeAddressBech32 addr) = toJSON $ stakeAddressToText addr - -instance FromJSON GYStakeAddressBech32 where - parseJSON = withText "GYStakeAddressBech32" $ \t -> - case stakeAddressFromTextMaybe t of - Just addr -> pure $ GYStakeAddressBech32 addr - Nothing -> fail "cannot deserialise stake address" - data UserRaw = UserRaw { urSKeyPath :: !FilePath, urColl :: !(Maybe GYTxOutRef), diff --git a/geniusyield-market-maker/src/GeniusYield/MarketMaker/Utils.hs b/geniusyield-market-maker/src/GeniusYield/MarketMaker/Utils.hs index 1f54b39..140f881 100644 --- a/geniusyield-market-maker/src/GeniusYield/MarketMaker/Utils.hs +++ b/geniusyield-market-maker/src/GeniusYield/MarketMaker/Utils.hs @@ -3,8 +3,7 @@ module GeniusYield.MarketMaker.Utils where import qualified Data.Text as Text import GeniusYield.Api.Dex.PartialOrder (PORefs) import GeniusYield.Imports (coerce, first) -import GeniusYield.MarketMaker.User (User (..), - stakeAddressFromBech32) +import GeniusYield.MarketMaker.User (User (..)) import GeniusYield.Providers.Common (SomeDeserializeError (DeserializeErrorAssetClass)) import GeniusYield.Scripts (HasPartialOrderConfigAddr (..), HasPartialOrderNftScript (..),