diff --git a/internal/transform/asset.go b/internal/transform/asset.go index 2117fdc5..cbe60395 100644 --- a/internal/transform/asset.go +++ b/internal/transform/asset.go @@ -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 } diff --git a/internal/transform/asset_test.go b/internal/transform/asset_test.go index 3270c7b7..deedbe49 100644 --- a/internal/transform/asset_test.go +++ b/internal/transform/asset_test.go @@ -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 diff --git a/internal/transform/claimable_balance.go b/internal/transform/claimable_balance.go index d7c6d1ab..7db3ef8f 100644 --- a/internal/transform/claimable_balance.go +++ b/internal/transform/claimable_balance.go @@ -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), diff --git a/internal/transform/offer.go b/internal/transform/offer.go index 5f44a3c9..c0cc787e 100644 --- a/internal/transform/offer.go +++ b/internal/transform/offer.go @@ -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, diff --git a/internal/transform/schema.go b/internal/transform/schema.go index f70c53cd..7713b188 100644 --- a/internal/transform/schema.go +++ b/internal/transform/schema.go @@ -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