Skip to content

Commit

Permalink
api: add Sanchonet environment
Browse files Browse the repository at this point in the history
  • Loading branch information
sorki committed Dec 1, 2023
1 parent 37ae32d commit dbc91b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion blockfrost-api/src/Blockfrost/Env.hs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ data Env =
| Testnet
| Preprod
| Preview
| Sanchonet
| Localhost
deriving (Eq, Read, Show, Ord, Generic)

Expand All @@ -30,4 +31,4 @@ parseEnv tEnv = case Text.Read.readMaybe (Data.Text.unpack $ Data.Text.toTitle t
Nothing ->
Left
$ "Unknown environment: `" <> tEnv <> "`"
<> " expecting one of `ipfs`, `mainnet`, `testnet`, `preprod`, `preview`, `localhost`"
<> " expecting one of `ipfs`, `mainnet`, `testnet`, `preprod`, `preview`, `sanchonet`, `localhost`"
1 change: 1 addition & 0 deletions blockfrost-client-core/src/Blockfrost/Client/Core.hs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ subdomainByEnv Mainnet = pure "cardano-mainnet"
subdomainByEnv Testnet = pure "cardano-testnet"
subdomainByEnv Preprod = pure "cardano-preprod"
subdomainByEnv Preview = pure "cardano-preview"
subdomainByEnv Sanchonet = pure "cardano-sanchonet"
subdomainByEnv Localhost = Nothing

-- | Read file according to BLOCKFROST_TOKEN_PATH environment variable name.
Expand Down

0 comments on commit dbc91b3

Please sign in to comment.