File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed
cardano-db-sync/src/Cardano/DbSync Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ import Cardano.DbSync.Types (
22
22
OffChainUrlType (.. ),
23
23
SimplifiedOffChainPoolData (.. ),
24
24
SimplifiedOffChainVoteData (.. ),
25
- getUrl ,
25
+ showUrl ,
26
26
)
27
27
import Cardano.DbSync.Util (renderByteArray )
28
28
import Cardano.Prelude hiding (show )
@@ -182,7 +182,7 @@ isPossiblyJsonObject bs =
182
182
-------------------------------------------------------------------------------------
183
183
parseOffChainUrl :: OffChainUrlType -> ExceptT OffChainFetchError IO Http. Request
184
184
parseOffChainUrl url =
185
- handleExceptT wrapHttpException $ applyContentType <$> Http. parseRequest (getUrl url)
185
+ handleExceptT wrapHttpException $ applyContentType <$> Http. parseRequest (showUrl url)
186
186
where
187
187
wrapHttpException :: HttpException -> OffChainFetchError
188
188
wrapHttpException err = OCFErrHttpException url (textShow err)
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ module Cardano.DbSync.Types (
28
28
SimplifiedOffChainVoteData (.. ),
29
29
PraosStandard ,
30
30
Retry (.. ),
31
- getUrl ,
31
+ showUrl ,
32
32
) where
33
33
34
34
import Cardano.Db (
@@ -55,6 +55,7 @@ import qualified Cardano.Ledger.Hashes as Ledger
55
55
import Cardano.Ledger.Keys
56
56
import Cardano.Prelude hiding (Meta , show )
57
57
import Cardano.Slotting.Slot (EpochNo (.. ), EpochSize (.. ), SlotNo (.. ))
58
+ import qualified Data.Text as Text
58
59
import Data.Time.Clock (UTCTime )
59
60
import Data.Time.Clock.POSIX (POSIXTime )
60
61
import qualified Ouroboros.Consensus.Cardano.Block as Cardano
@@ -202,13 +203,13 @@ data OffChainUrlType
202
203
deriving (Eq , Generic )
203
204
204
205
instance Show OffChainUrlType where
205
- show = getUrl
206
+ show = showUrl
206
207
207
- getUrl :: OffChainUrlType -> String
208
- getUrl =
208
+ showUrl :: OffChainUrlType -> String
209
+ showUrl =
209
210
\ case
210
- OffChainPoolUrl url -> show url
211
- OffChainVoteUrl url -> show url
211
+ OffChainPoolUrl url -> Text. unpack $ DB. unPoolUrl url
212
+ OffChainVoteUrl url -> Text. unpack $ DB. unVoteUrl url
212
213
213
214
-------------------------------------------------------------------------------------
214
215
-- OffChain Fetch error for the HTTP client fetching the pool offchain metadata.
You can’t perform that action at this time.
0 commit comments