Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Commit

Permalink
[CON-765] Default v2 signup and fix local EM (#3730)
Browse files Browse the repository at this point in the history
  • Loading branch information
theoilie authored Jul 13, 2023
1 parent b458446 commit 1aca4db
Show file tree
Hide file tree
Showing 12 changed files with 259 additions and 244 deletions.
42 changes: 21 additions & 21 deletions packages/common/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"url": "https://github.com/AudiusProject/audius-client/issues"
},
"dependencies": {
"@audius/sdk": "3.0.3-beta.63",
"@audius/sdk": "3.0.3-beta.76",
"@fingerprintjs/fingerprintjs-pro": "3.5.6",
"@metaplex-foundation/mpl-token-metadata": "2.5.2",
"@optimizely/optimizely-sdk": "4.0.0",
Expand Down
54 changes: 4 additions & 50 deletions packages/common/src/services/audius-backend/AudiusBackend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -599,14 +599,8 @@ export const audiusBackend = ({

async function sanityChecks(audiusLibs: any) {
try {
const sanityCheckOptions = {
skipRollover: getRemoteVar(BooleanKeys.SKIP_ROLLOVER_NODES_SANITY_CHECK)
}
const sanityChecks = new SanityChecks(audiusLibs, sanityCheckOptions)
await sanityChecks.run(
null,
getBlockList(StringKeys.CONTENT_NODE_BLOCK_LIST)
)
const sanityChecks = new SanityChecks(audiusLibs)
await sanityChecks.run()
} catch (e) {
console.error(`Sanity checks failed: ${e}`)
}
Expand Down Expand Up @@ -670,13 +664,9 @@ export const audiusBackend = ({

const baseCreatorNodeConfig = AudiusLibs.configCreatorNode(
userNodeUrl,
/* lazyConnect */ true,
/* passList */ null,
contentNodeBlockList,
monitoringCallbacks.contentNode,
/* writeQuorumEnabled */ await getFeatureEnabled(
FeatureFlags.WRITE_QUORUM_ENABLED
)
monitoringCallbacks.contentNode
)

try {
Expand Down Expand Up @@ -1657,31 +1647,7 @@ export const audiusBackend = ({
setLocalStorageItem('is-mobile-user', 'true')
}

const storageV2SignupEnabled = await getFeatureEnabled(
FeatureFlags.STORAGE_V2_SIGNUP
)
if (storageV2SignupEnabled) {
return await audiusLibs.Account.signUpV2(
email,
password,
metadata,
formFields.profilePicture,
formFields.coverPhoto,
hasWallet,
getHostUrl(),
(eventName: string, properties: Record<string, unknown>) =>
recordAnalytics({ eventName, properties }),
{
Request: Name.CREATE_USER_BANK_REQUEST,
Success: Name.CREATE_USER_BANK_SUCCESS,
Failure: Name.CREATE_USER_BANK_FAILURE
},
feePayerOverride,
true
)
}
// Returns { userId, error, phase }
return await audiusLibs.Account.signUp(
return await audiusLibs.Account.signUpV2(
email,
password,
metadata,
Expand Down Expand Up @@ -1726,17 +1692,6 @@ export const audiusBackend = ({
return audiusLibs.Account.generateRecoveryLink({ host })
}

async function associateAudiusUserForAuth(email: string, handle: string) {
await waitForLibsInit()
try {
await audiusLibs.Account.associateAudiusUserForAuth(email, handle)
return { success: true }
} catch (error) {
console.error(getErrorMessage(error))
return { success: false, error }
}
}

async function emailInUse(email: string) {
await waitForLibsInit()
try {
Expand Down Expand Up @@ -3247,7 +3202,6 @@ export const audiusBackend = ({
addDiscoveryProviderSelectionListener,
addPlaylistTrack,
audiusLibs: audiusLibs as AudiusLibsType,
associateAudiusUserForAuth,
associateInstagramAccount,
associateTwitterAccount,
associateTikTokAccount,
Expand Down
4 changes: 0 additions & 4 deletions packages/common/src/services/remote-config/feature-flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export enum FeatureFlags {
ENABLE_SPL_AUDIO = 'enable_spl_audio',
DISABLE_SIGN_UP_CONFIRMATION = 'disable_sign_up_confirmation',
TIPPING_ENABLED = 'tipping_enabled',
WRITE_QUORUM_ENABLED = 'write_quorum_enabled',
EARLY_ACCESS = 'early_access',
SUPPORTER_DETHRONED_ENABLED = 'supporter_dethroned_enabled',
NEW_ARTIST_DASHBOARD_TABLE = 'new_artist_dashboard_table',
Expand Down Expand Up @@ -41,7 +40,6 @@ export enum FeatureFlags {
SDK_DISCOVERY_NODE_SELECTOR = 'sdk_discovery_node_selector_2',
RELATED_ARTISTS_ON_PROFILE_ENABLED = 'related_artists_on_profile_enabled',
PROXY_WORMHOLE = 'proxy_wormhole',
STORAGE_V2_SIGNUP = 'storage_v2_signup',
PLAYLIST_UPDATES_PRE_QA = 'playlist_updates_pre_qa',
PLAYLIST_UPDATES_POST_QA = 'playlist_updates_post_qa',
AI_ATTRIBUTION = 'ai_attribution',
Expand Down Expand Up @@ -74,7 +72,6 @@ export const flagDefaults: FlagDefaults = {
[FeatureFlags.ENABLE_SPL_AUDIO]: false,
[FeatureFlags.DISABLE_SIGN_UP_CONFIRMATION]: false,
[FeatureFlags.TIPPING_ENABLED]: false,
[FeatureFlags.WRITE_QUORUM_ENABLED]: false,
[FeatureFlags.EARLY_ACCESS]: false,
[FeatureFlags.SUPPORTER_DETHRONED_ENABLED]: false,
[FeatureFlags.NEW_ARTIST_DASHBOARD_TABLE]: false,
Expand Down Expand Up @@ -104,7 +101,6 @@ export const flagDefaults: FlagDefaults = {
[FeatureFlags.SDK_DISCOVERY_NODE_SELECTOR]: false,
[FeatureFlags.RELATED_ARTISTS_ON_PROFILE_ENABLED]: false,
[FeatureFlags.PROXY_WORMHOLE]: false,
[FeatureFlags.STORAGE_V2_SIGNUP]: false,
[FeatureFlags.PLAYLIST_UPDATES_PRE_QA]: false,
[FeatureFlags.PLAYLIST_UPDATES_POST_QA]: false,
[FeatureFlags.AI_ATTRIBUTION]: false,
Expand Down
24 changes: 12 additions & 12 deletions packages/embed/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/embed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"webpack-cli": "4.5.0"
},
"dependencies": {
"@audius/sdk": "3.0.3-beta.63",
"@audius/sdk": "3.0.3-beta.76",
"@audius/stems": "1.5.31",
"amplitude-js": "8.11.1",
"axios": "0.19.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/.env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ AMPLITUDE_WRITE_KEY=abc
OPTIMIZELY_KEY=MX4fYBgANQetvmBXGpuxzF

REGISTRY_ADDRESS=0xCfEB869F69431e42cdB54A4F4f105C19C080A601
ENTITY_MANAGER_ADDRESS=0x5b9b42d6e4B2e4Bf8d42Eba32D46918e10899B66
ENTITY_MANAGER_ADDRESS=0x254dffcd3277C0b1660F6d42EFbB754edaBAbC2B
WEB3_PROVIDER_URL=http://audius-protocol-poa-ganache-1

ETH_REGISTRY_ADDRESS=0xABbfF712977dB51f9f212B85e8A4904c818C2b63
Expand Down
Loading

0 comments on commit 1aca4db

Please sign in to comment.