diff --git a/internal/transform/liquidity_pool.go b/internal/transform/liquidity_pool.go index e6a34a0f..5cd66674 100644 --- a/internal/transform/liquidity_pool.go +++ b/internal/transform/liquidity_pool.go @@ -36,15 +36,15 @@ func TransformPool(ledgerChange ingest.Change) (PoolOutput, error) { } var assetAType, assetACode, assetAIssuer string - err = cp.Params.AssetA.Extract(&assetAType, &assetACode, &assetAIssuer) + err = cp.Params.AssetA.Extract(&assetACode, &assetAIssuer, &assetAType) if err != nil { return PoolOutput{}, err } - assetAID := FarmHashAsset(assetAType, assetACode, assetAIssuer) + assetAID := FarmHashAsset(assetACode, assetAIssuer, assetAType) var assetBType, assetBCode, assetBIssuer string - err = cp.Params.AssetB.Extract(&assetBType, &assetBCode, &assetBIssuer) - assetBID := FarmHashAsset(assetBType, assetBCode, assetBIssuer) + err = cp.Params.AssetB.Extract(&assetBCode, &assetBIssuer, &assetBType) + assetBID := FarmHashAsset(assetBCode, assetBIssuer, assetBType) transformedPool := PoolOutput{ PoolID: PoolIDToString(lp.LiquidityPoolId), diff --git a/internal/transform/trade.go b/internal/transform/trade.go index 57bb07ab..27dfc0da 100644 --- a/internal/transform/trade.go +++ b/internal/transform/trade.go @@ -46,7 +46,7 @@ func TransformTrade(operationIndex int32, operationID int64, transaction ingest. if err != nil { return []TradeOutput{}, err } - outputSellingAssetID := FarmHashAsset(outputSellingAssetType, outputSellingAssetCode, outputSellingAssetIssuer) + outputSellingAssetID := FarmHashAsset(outputSellingAssetCode, outputSellingAssetIssuer, outputSellingAssetType) outputSellingAmount := claimOffer.AmountSold() if outputSellingAmount < 0 { @@ -58,7 +58,7 @@ func TransformTrade(operationIndex int32, operationID int64, transaction ingest. if err != nil { return []TradeOutput{}, err } - outputBuyingAssetID := FarmHashAsset(outputBuyingAssetType, outputBuyingAssetCode, outputBuyingAssetIssuer) + outputBuyingAssetID := FarmHashAsset(outputBuyingAssetCode, outputBuyingAssetIssuer, outputBuyingAssetType) outputBuyingAmount := int64(claimOffer.AmountBought()) if outputBuyingAmount < 0 {