diff --git a/api/comms_blasts_test.go b/api/comms_blasts_test.go index 087b2227..2374fa52 100644 --- a/api/comms_blasts_test.go +++ b/api/comms_blasts_test.go @@ -59,11 +59,22 @@ func TestGetNewBlasts(t *testing.T) { }, { "track_id": 2, - "owner_id": 2, + "owner_id": 1, "title": "Remix Track", "created_at": now.Add(-time.Minute * 10), "updated_at": now.Add(-time.Minute * 10), }, + { + // Owned by user 2 so user 2 qualifies as a remixer of track 1. + // Track 2 is now owned by artist1 (so v_usdc_purchases reports + // user 1 as the seller for customer_audience filtering), which + // previously was what made user 2 a remixer. + "track_id": 3, + "owner_id": 2, + "title": "Fan Remix", + "created_at": now.Add(-time.Minute * 10), + "updated_at": now.Add(-time.Minute * 10), + }, }, "follows": { { @@ -96,6 +107,11 @@ func TestGetNewBlasts(t *testing.T) { "parent_track_id": 1, "child_track_id": 2, }, + { + // Makes user 2 (owner of track 3) a remixer of track 1. + "parent_track_id": 1, + "child_track_id": 3, + }, }, "sol_purchases": { {"signature": "purchase_sig_123", "instruction_index": 0, "buyer_user_id": 2, "content_type": "track", "content_id": 1, "amount": 1000000, "created_at": now.Add(-time.Hour * 2), "slot": 101, "is_valid": true}, diff --git a/api/v1_users_purchases_download_test.go b/api/v1_users_purchases_download_test.go index 89ff1ed6..92913749 100644 --- a/api/v1_users_purchases_download_test.go +++ b/api/v1_users_purchases_download_test.go @@ -50,7 +50,7 @@ func TestV1UsersPurchasesDownload(t *testing.T) { }, // Drives extra_amount = 500000 (amount=1000000 - base_price=50_cents*10000=500000) "track_price_history": []map[string]any{ - {"track_id": 1, "total_price_cents": 50, "blocknumber": 100, "block_timestamp": time.Date(2024, 6, 3, 0, 0, 0, 0, time.UTC), "splits": "[]"}, + {"track_id": 1, "total_price_cents": 50, "block_timestamp": time.Date(2024, 6, 3, 0, 0, 0, 0, time.UTC), "splits": "[]"}, }, } @@ -163,7 +163,7 @@ func TestV1UsersPurchasesDownloadWithGrantee(t *testing.T) { {"signature": "def", "instruction_index": 0, "route_index": 1, "to_account": app.solanaConfig.StakingBridgeUsdcTokenAccount.String(), "amount": 100000, "slot": 101}, }, "track_price_history": []map[string]any{ - {"track_id": 1, "total_price_cents": 50, "blocknumber": 100, "block_timestamp": time.Date(2024, 6, 3, 0, 0, 0, 0, time.UTC), "splits": "[]"}, + {"track_id": 1, "total_price_cents": 50, "block_timestamp": time.Date(2024, 6, 3, 0, 0, 0, 0, time.UTC), "splits": "[]"}, }, "grants": []map[string]any{ { diff --git a/api/v1_users_purchases_test.go b/api/v1_users_purchases_test.go index dc1f57dd..00bfb0e1 100644 --- a/api/v1_users_purchases_test.go +++ b/api/v1_users_purchases_test.go @@ -33,7 +33,7 @@ func TestV1UsersPurchases(t *testing.T) { // For the purchase with non-zero extra_amount (signature "abc"), seed a track_price_history // row so the view's amount - base_price computation produces extra_amount = 1000000. "track_price_history": []map[string]any{ - {"track_id": 1, "total_price_cents": 0, "blocknumber": 100, "block_timestamp": time.Date(2024, 6, 2, 23, 0, 0, 0, time.UTC), "splits": "[]"}, + {"track_id": 1, "total_price_cents": 0, "block_timestamp": time.Date(2024, 6, 2, 23, 0, 0, 0, time.UTC), "splits": "[]"}, }, "sol_purchases": []map[string]any{ { diff --git a/api/v1_users_sales_download_test.go b/api/v1_users_sales_download_test.go index c144b1ae..18061501 100644 --- a/api/v1_users_sales_download_test.go +++ b/api/v1_users_sales_download_test.go @@ -49,7 +49,7 @@ func TestV1UsersSalesDownload(t *testing.T) { {"signature": "def", "instruction_index": 0, "route_index": 1, "to_account": app.solanaConfig.StakingBridgeUsdcTokenAccount.String(), "amount": 100000, "slot": 101}, }, "track_price_history": []map[string]any{ - {"track_id": 1, "total_price_cents": 50, "blocknumber": 100, "block_timestamp": time.Date(2024, 6, 3, 0, 0, 0, 0, time.UTC), "splits": "[]"}, + {"track_id": 1, "total_price_cents": 50, "block_timestamp": time.Date(2024, 6, 3, 0, 0, 0, 0, time.UTC), "splits": "[]"}, }, "encrypted_emails": []map[string]any{ { @@ -193,7 +193,7 @@ func TestV1UsersSalesDownloadWithGrantee(t *testing.T) { {"signature": "def", "instruction_index": 0, "route_index": 1, "to_account": app.solanaConfig.StakingBridgeUsdcTokenAccount.String(), "amount": 100000, "slot": 101}, }, "track_price_history": []map[string]any{ - {"track_id": 1, "total_price_cents": 50, "blocknumber": 100, "block_timestamp": time.Date(2024, 6, 3, 0, 0, 0, 0, time.UTC), "splits": "[]"}, + {"track_id": 1, "total_price_cents": 50, "block_timestamp": time.Date(2024, 6, 3, 0, 0, 0, 0, time.UTC), "splits": "[]"}, }, "encrypted_emails": []map[string]any{ { diff --git a/api/v1_users_sales_test.go b/api/v1_users_sales_test.go index 7c260585..f0cfae2b 100644 --- a/api/v1_users_sales_test.go +++ b/api/v1_users_sales_test.go @@ -32,7 +32,7 @@ func TestV1UsersSales(t *testing.T) { }, "track_price_history": []map[string]any{ // Drives extra_amount = 1000000 for signature "abc" (amount=1000000, base_price=0) - {"track_id": 1, "total_price_cents": 0, "blocknumber": 100, "block_timestamp": time.Date(2024, 6, 2, 23, 0, 0, 0, time.UTC), "splits": "[]"}, + {"track_id": 1, "total_price_cents": 0, "block_timestamp": time.Date(2024, 6, 2, 23, 0, 0, 0, time.UTC), "splits": "[]"}, }, "sol_purchases": []map[string]any{ {"signature": "gfsgf", "instruction_index": 0, "buyer_user_id": 5, "amount": 2000000, "content_type": "playlist", "content_id": 1, "created_at": time.Date(2024, 6, 1, 0, 0, 0, 0, time.UTC), "is_valid": true},