From 48c044e6a3fd9e5cb2845799f74e20a5df048288 Mon Sep 17 00:00:00 2001 From: Simon Chow Date: Fri, 11 Oct 2024 10:17:42 -0400 Subject: [PATCH] strip null chars from asset code in contract data --- internal/transform/contract_data.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/transform/contract_data.go b/internal/transform/contract_data.go index d9a12e64..a1b8de1e 100644 --- a/internal/transform/contract_data.go +++ b/internal/transform/contract_data.go @@ -3,6 +3,7 @@ package transform import ( "fmt" "math/big" + "strings" "github.com/stellar/go/ingest" "github.com/stellar/go/strkey" @@ -71,6 +72,7 @@ func (t *TransformContractDataStruct) TransformContractData(ledgerChange ingest. if contractDataAsset != nil { contractDataAssetType = contractDataAsset.Type.String() contractDataAssetCode = contractDataAsset.GetCode() + contractDataAssetCode = strings.ReplaceAll(contractDataAssetCode, "\x00", "") contractDataAssetIssuer = contractDataAsset.GetIssuer() }