Skip to content
Closed
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
5 changes: 5 additions & 0 deletions .changeset/aao-endpoint-engineering.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@audius/sdk': patch
---

Point the production anti-abuse oracle endpoint at `https://anti-abuse-oracle.audius.engineering`, replacing the old `https://discoveryprovider.audius.co` host in the SDK services config and supporting clients/services.
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export async function getUserNormalizedScore(userId: number, wallet: string) {
}

export async function getAAOAttestation(handle: string) {
const url = `https://antiabuseoracle.audius.co/abuse/${handle}`
const url = `https://anti-abuse-oracle.audius.engineering/abuse/${handle}`
try {
const response = await fetch(url)
if (!response.ok) {
Expand Down
2 changes: 1 addition & 1 deletion packages/identity-service/src/utils/antiAbuse.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { logger } = require('../logging')
const models = require('../models')

const aaoEndpoint =
config.get('aaoEndpoint') || 'https://antiabuseoracle.audius.co'
config.get('aaoEndpoint') || 'https://anti-abuse-oracle.audius.engineering'

const allowRules = new Set([-17, -18])
const blockRelayAbuseErrorCodes = new Set([0, 8, 10, 13, 15, 18])
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/src/services/env/env.prod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Env } from '@audius/common/services'
import Config from 'react-native-config'

export const env: Env = {
AAO_ENDPOINT: 'https://discoveryprovider.audius.co',
AAO_ENDPOINT: 'https://anti-abuse-oracle.audius.engineering',
AMPLITUDE_API_KEY: '86760558b8bb1b3aae61656efd4ddacb',
AMPLITUDE_PROXY: 'https://gain2.audius.co/2/httpapi',
API_KEY: '8acf5eb7436ea403ee536a7334faa5e9ada4b50f',
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/src/sdk/config/production.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const productionConfig: SdkServicesConfig = {
],
"antiAbuseOracleNodes": {
"endpoints": [
"https://discoveryprovider.audius.co",
"https://anti-abuse-oracle.audius.engineering",
"https://audius-oracle.creatorseed.com",
"https://oracle.audius.endl.net"
],
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/src/sdk/scripts/generateServicesConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const productionConfig: SdkServicesConfig = {
storageNodes: [],
antiAbuseOracleNodes: {
endpoints: [
'https://discoveryprovider.audius.co',
'https://anti-abuse-oracle.audius.engineering',
'https://audius-oracle.creatorseed.com',
'https://oracle.audius.endl.net'
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import Page from 'components/page/Page'
import { useRequiresAccount } from 'hooks/useRequiresAccount'
import { useTrackCoverArt } from 'hooks/useTrackCoverArt'
import { track, make } from 'services/analytics'
import { fullContestPage, fullTrackPage } from 'utils/route'
import { contestPage } from 'utils/route'

import {
TimeInput,
Expand Down Expand Up @@ -161,7 +161,7 @@ export const HostRemixContestPage = () => {
isContestEntry: true
})

const { mutate: createEvent } = useCreateEvent()
const { mutateAsync: createEvent } = useCreateEvent()
const { mutate: updateEvent } = useUpdateEvent()
const { mutate: deleteEvent } = useDeleteEvent()

Expand Down Expand Up @@ -442,14 +442,10 @@ export const HostRemixContestPage = () => {
navigate(CONTESTS_PAGE)
return
}
navigate(
isEdit
? fullContestPage(primaryPermalink)
: fullTrackPage(primaryPermalink)
)
navigate(isEdit ? contestPage(primaryPermalink) : primaryPermalink)
}, [clearDraft, isEdit, navigate, primaryPermalink])

const handleSubmit = useCallback(() => {
const handleSubmit = useCallback(async () => {
const parsedTime = parseTime(timeValue)
if (!parsedTime) return

Expand Down Expand Up @@ -500,14 +496,21 @@ export const HostRemixContestPage = () => {
})
)
} else {
createEvent({
eventType: EventEventTypeEnum.RemixContest,
entityType: EventEntityTypeEnum.Track,
entityId: entityTrackId,
eventData,
endDate,
userId: currentUserId
})
try {
await createEvent({
eventType: EventEventTypeEnum.RemixContest,
entityType: EventEntityTypeEnum.Track,
entityId: entityTrackId,
eventData,
endDate,
userId: currentUserId
})
} catch {
// Mutation's onError already surfaces a toast; stay on the form so
// the user can retry instead of navigating to a half-created
// contest page.
return
}

track(
make({
Expand All @@ -519,7 +522,7 @@ export const HostRemixContestPage = () => {

clearDraft()
if (effectivePermalink) {
navigate(fullContestPage(effectivePermalink))
navigate(contestPage(effectivePermalink))
} else {
navigate(CONTESTS_PAGE)
}
Expand Down Expand Up @@ -561,7 +564,7 @@ export const HostRemixContestPage = () => {
}
clearDraft()
if (primaryPermalink) {
navigate(fullTrackPage(primaryPermalink))
navigate(primaryPermalink)
}
}, [
clearDraft,
Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/services/env/env.prod.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Env } from '@audius/common/services'

export const env: Env = {
AAO_ENDPOINT: 'https://discoveryprovider.audius.co',
AAO_ENDPOINT: 'https://anti-abuse-oracle.audius.engineering',
AMPLITUDE_API_KEY: '86760558b8bb1b3aae61656efd4ddacb',
AMPLITUDE_PROXY: 'https://gain2.audius.co/2/httpapi',
API_KEY: '8acf5eb7436ea403ee536a7334faa5e9ada4b50f',
Expand Down
Loading