Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed mismatch type in assetOutput schema #201

Merged
merged 1 commit into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading