Skip to content

Commit

Permalink
strip null chars from asset code in contract data
Browse files Browse the repository at this point in the history
  • Loading branch information
chowbao committed Oct 11, 2024
1 parent e53586a commit 48c044e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/transform/contract_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package transform
import (
"fmt"
"math/big"
"strings"

"github.com/stellar/go/ingest"
"github.com/stellar/go/strkey"
Expand Down Expand Up @@ -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()
}

Expand Down

0 comments on commit 48c044e

Please sign in to comment.