From a00f127910584d754e1f814e56a24baeb27c62c3 Mon Sep 17 00:00:00 2001 From: Mateusz Galazyn Date: Mon, 18 Sep 2023 16:06:28 +0200 Subject: [PATCH] Add JSON instance for `Hash GenesisKey` --- .github/workflows/haskell.yml | 4 ---- cardano-api/internal/Cardano/Api/Keys/Shelley.hs | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index dd813f532b..b9c67bc85d 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -45,10 +45,6 @@ jobs: f+${{ matrix.os }} g+${{ (startsWith(github.ref, 'refs/heads/gh-readonly-queue/') && github.run_id) || github.event.pull_request.number || github.ref }} - - name: Apt update - if: matrix.os == 'ubuntu-latest' - run: sudo apt update - - name: Install Haskell uses: input-output-hk/actions/haskell@latest id: setup-haskell diff --git a/cardano-api/internal/Cardano/Api/Keys/Shelley.hs b/cardano-api/internal/Cardano/Api/Keys/Shelley.hs index 96f2fa0190..428d106c88 100644 --- a/cardano-api/internal/Cardano/Api/Keys/Shelley.hs +++ b/cardano-api/internal/Cardano/Api/Keys/Shelley.hs @@ -641,6 +641,7 @@ newtype instance Hash GenesisKey = deriving stock (Eq, Ord) deriving (Show, IsString) via UsingRawBytesHex (Hash GenesisKey) deriving (ToCBOR, FromCBOR) via UsingRawBytes (Hash GenesisKey) + deriving (ToJSONKey, ToJSON, FromJSON) via UsingRawBytesHex (Hash GenesisKey) deriving anyclass SerialiseAsCBOR instance SerialiseAsRawBytes (Hash GenesisKey) where