Skip to content

Commit

Permalink
Merge pull request #201 from stellar/fix-mismatch-schema-type
Browse files Browse the repository at this point in the history
fixed mismatch type in assetOutput schema
  • Loading branch information
cayod authored Oct 13, 2023
2 parents 32c5434 + 2555517 commit e9c803c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions internal/transform/asset.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ func transformSingleAsset(asset xdr.Asset) (AssetOutput, error) {
AssetCode: outputAssetCode,
AssetIssuer: outputAssetIssuer,
AssetType: outputAssetType,
AssetID: farmAssetID,
ID: outputAssetID,
AssetID: outputAssetID,
ID: farmAssetID,
}, nil
}

Expand Down
8 changes: 4 additions & 4 deletions internal/transform/asset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,16 @@ func makeAssetTestOutput() (transformedAssets []AssetOutput) {
AssetCode: "USDT",
AssetIssuer: "GBVVRXLMNCJQW3IDDXC3X6XCH35B5Q7QXNMMFPENSOGUPQO7WO7HGZPA",
AssetType: "credit_alphanum4",
AssetID: -8205667356306085451,
AssetID: 1229977787683536144,

ID: 1229977787683536144,
ID: -8205667356306085451,
},
AssetOutput{
AssetCode: "",
AssetIssuer: "",
AssetType: "native",
AssetID: -5706705804583548011,
ID: 12638146518625398189,
AssetID: 12638146518625398189,
ID: -5706705804583548011,
},
}
return
Expand Down
2 changes: 1 addition & 1 deletion internal/transform/claimable_balance.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func TransformClaimableBalance(ledgerChange ingest.Change) (ClaimableBalanceOutp
AssetCode: outputAsset.AssetCode,
AssetIssuer: outputAsset.AssetIssuer,
AssetType: outputAsset.AssetType,
AssetID: outputAsset.AssetID,
AssetID: outputAsset.ID,
Claimants: outputClaimants,
AssetAmount: float64(outputAmount) / 1.0e7,
Sponsor: ledgerEntrySponsorToNullString(ledgerEntry),
Expand Down
4 changes: 2 additions & 2 deletions internal/transform/offer.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ func TransformOffer(ledgerChange ingest.Change) (OfferOutput, error) {
SellingAssetType: outputSellingAsset.AssetType,
SellingAssetCode: outputSellingAsset.AssetCode,
SellingAssetIssuer: outputSellingAsset.AssetIssuer,
SellingAssetID: outputSellingAsset.AssetID,
SellingAssetID: outputSellingAsset.ID,
BuyingAssetType: outputBuyingAsset.AssetType,
BuyingAssetCode: outputBuyingAsset.AssetCode,
BuyingAssetIssuer: outputBuyingAsset.AssetIssuer,
BuyingAssetID: outputBuyingAsset.AssetID,
BuyingAssetID: outputBuyingAsset.ID,
Amount: utils.ConvertStroopValueToReal(outputAmount),
PriceN: outputPriceN,
PriceD: outputPriceD,
Expand Down
4 changes: 2 additions & 2 deletions internal/transform/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ type AssetOutput struct {
AssetCode string `json:"asset_code"`
AssetIssuer string `json:"asset_issuer"`
AssetType string `json:"asset_type"`
AssetID int64 `json:"asset_id"`
ID uint64 `json:"id"`
AssetID uint64 `json:"id"`
ID int64 `json:"asset_id"`
}

// TrustlineOutput is a representation of a trustline that aligns with the BigQuery table trust_lines
Expand Down

0 comments on commit e9c803c

Please sign in to comment.