@@ -81,6 +81,7 @@ import ChainwebData.TxSummary
8181import ChainwebDb.Types.Block
8282import ChainwebDb.Types.Common
8383import ChainwebDb.Types.DbHash
84+ import ChainwebDb.Types.PgText
8485import ChainwebDb.Types.Signer
8586import ChainwebDb.Types.Transfer
8687import ChainwebDb.Types.Transaction
@@ -391,7 +392,7 @@ toApiTxDetail tx contHist blk evs signers sigs = TxDetail
391392 where
392393 unMaybeValue = maybe Null unPgJsonb
393394 toTxEvent ev =
394- TxEvent (_ev_qualName ev) (unPgJsonb $ _ev_params ev)
395+ TxEvent (unPgText $ _ev_qualName ev) (unPgJsonb $ _ev_params ev)
395396
396397getMaxBlockHeight :: LogFunctionIO Text -> Connection -> IO (Maybe BlockHeight )
397398getMaxBlockHeight logger c =
@@ -511,10 +512,10 @@ accountHandler logger pool req account token chain minheight maxheight limit mbO
511512 continuation <- mkContinuation readEventToken mbOffset mbNext
512513 isBounded <- isBoundedStrategyM req
513514 let searchParams = TransferSearchParams
514- { tspToken = usedCoinType
515+ { tspToken = PgText usedCoinType
515516 , tspChainId = chain
516517 , tspHeightRange = HeightRangeParams minheight maxheight
517- , tspAccount = account
518+ , tspAccount = PgText account
518519 }
519520 liftIO $ M. with pool $ \ (c, throttling) -> do
520521 let
@@ -531,15 +532,15 @@ accountHandler logger pool req account token chain minheight maxheight limit mbO
531532 continuation
532533 resultLimit
533534 return $ maybe noHeader (addHeader . mkEventToken) mbCont $ results <&> \ (tr, extras) -> TransferDetail
534- { _trDetail_token = _tr_modulename tr
535+ { _trDetail_token = unPgText $ _tr_modulename tr
535536 , _trDetail_chain = fromIntegral $ _tr_chainid tr
536537 , _trDetail_height = fromIntegral $ _tr_height tr
537538 , _trDetail_blockHash = unDbHash $ unBlockId $ _tr_block tr
538539 , _trDetail_requestKey = getTxHash $ _tr_requestkey tr
539540 , _trDetail_idx = fromIntegral $ _tr_idx tr
540541 , _trDetail_amount = StringEncoded $ getKDAScientific $ _tr_amount tr
541- , _trDetail_fromAccount = _tr_from_acct tr
542- , _trDetail_toAccount = _tr_to_acct tr
542+ , _trDetail_fromAccount = unPgText $ _tr_from_acct tr
543+ , _trDetail_toAccount = unPgText $ _tr_to_acct tr
543544 , _trDetail_crossChainAccount = tseXChainAccount extras
544545 , _trDetail_crossChainId = fromIntegral <$> tseXChainId extras
545546 , _trDetail_blockTime = tseBlockTime extras
@@ -607,9 +608,9 @@ evHandler logger pool req limit mbOffset qSearch qParam qName qModuleName minhei
607608 resultLimit
608609 return $ maybe noHeader (addHeader . mkEventToken) mbCont $
609610 results <&> \ (ev,extras) -> EventDetail
610- { _evDetail_name = _ev_qualName ev
611+ { _evDetail_name = unPgText $ _ev_qualName ev
611612 , _evDetail_params = unPgJsonb $ _ev_params ev
612- , _evDetail_moduleHash = _ev_moduleHash ev
613+ , _evDetail_moduleHash = unPgText $ _ev_moduleHash ev
613614 , _evDetail_chain = fromIntegral $ _ev_chainid ev
614615 , _evDetail_height = fromIntegral $ _ev_height ev
615616 , _evDetail_blockTime = eseBlockTime extras
0 commit comments