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

Commit

Permalink
Wait for backend account for feature (#2269)
Browse files Browse the repository at this point in the history
  • Loading branch information
rickyrombo authored Nov 17, 2022
1 parent d3b7c45 commit 86d42af
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/web/src/store/application/ui/buy-audio/sagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ import {
import { JupiterSingleton } from 'services/audius-backend/Jupiter'
import { audiusBackendInstance } from 'services/audius-backend/audius-backend-instance'
import { reportToSentry } from 'store/errors/reportToSentry'
import { waitForBackendAndAccount } from 'utils/sagaHelpers'

const {
calculateAudioPurchaseInfo,
Expand Down Expand Up @@ -956,6 +957,7 @@ function* recoverPurchaseIfNecessary() {
let recoveredAudio: null | number = null
try {
// Bail if not enabled
yield* call(waitForBackendAndAccount)
const getFeatureEnabled = yield* getContext('getFeatureEnabled')
if (!getFeatureEnabled(FeatureFlags.BUY_AUDIO_ENABLED)) {
return
Expand Down

0 comments on commit 86d42af

Please sign in to comment.