Skip to content

Commit

Permalink
Remove some unused things in audiusBackend (#10785)
Browse files Browse the repository at this point in the history
  • Loading branch information
schottra authored Dec 18, 2024
1 parent 4b88529 commit 032af7a
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions packages/common/src/services/audius-backend/AudiusBackend.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { AUDIO, wAUDIO } from '@audius/fixed-decimal'
import { AudiusSdk, type StorageNodeSelectorService } from '@audius/sdk'
import { DiscoveryAPI } from '@audius/sdk-legacy/dist/core'
import { type AudiusLibs as AudiusLibsType } from '@audius/sdk-legacy/dist/libs'
import type { HedgehogConfig } from '@audius/sdk-legacy/dist/services/hedgehog'
import type { LocalStorage } from '@audius/sdk-legacy/dist/utils/localStorage'
Expand Down Expand Up @@ -252,7 +251,6 @@ export const audiusBackend = ({
waitForWeb3,
web3NetworkId,
web3ProviderUrls,
withEagerOption,
wormholeConfig: {
ethBridgeAddress,
ethTokenBridgeAddress,
Expand Down Expand Up @@ -513,29 +511,6 @@ export const audiusBackend = ({
}
}

// TODO(C-2719)
async function getUserListenCountsMonthly(
currentUserId: number,
startTime: string,
endTime: string
) {
try {
const userListenCountsMonthly = await withEagerOption(
{
normal: (libs) => libs.User.getUserListenCountsMonthly,
eager: DiscoveryAPI.getUserListenCountsMonthly
},
Id.parse(currentUserId),
startTime,
endTime
)
return userListenCountsMonthly
} catch (e) {
console.error(getErrorMessage(e))
return []
}
}

async function recordTrackListen({
userId,
trackId,
Expand Down Expand Up @@ -564,10 +539,6 @@ export const audiusBackend = ({
}
}

async function uploadImage(file: File) {
return await audiusLibs.creatorNode.uploadTrackCoverArtV2(file, () => {})
}

/**
* Retrieves both the user's ETH and SOL associated wallets from the user's metadata CID
* @param user The user metadata which contains the CID for the metadata multihash
Expand Down Expand Up @@ -1646,7 +1617,6 @@ export const audiusBackend = ({
getPushNotificationSettings,
getSafariBrowserPushEnabled,
getSignature,
getUserListenCountsMonthly,
getWAudioBalance,
getWeb3,
identityServiceUrl,
Expand All @@ -1672,7 +1642,6 @@ export const audiusBackend = ({
updatePushNotificationSettings,
updateUserEvent,
updateUserLocationTimezone,
uploadImage,
userNodeUrl,
waitForLibsInit,
waitForWeb3
Expand Down

0 comments on commit 032af7a

Please sign in to comment.