Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PAY-1996] Only attempt usdc recovery is user is logged in #6341

Merged
merged 2 commits into from
Oct 13, 2023
Merged
Changes from 1 commit
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
4 changes: 4 additions & 0 deletions packages/common/src/store/buy-usdc/sagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import {
} from './slice'
import { USDCOnRampProvider } from './types'
import { getUSDCUserBank } from './utils'
import { getAccountUser } from 'store/account/selectors'

// TODO: Configurable min/max usdc purchase amounts?
function* getBuyUSDCRemoteConfig() {
Expand Down Expand Up @@ -291,6 +292,9 @@ function* doBuyUSDC({
}

function* recoverPurchaseIfNecessary() {
const user = yield* select(getAccountUser)
if (!user) return

const reportToSentry = yield* getContext('reportToSentry')
const { track, make } = yield* getContext('analytics')
const audiusBackendInstance = yield* getContext('audiusBackendInstance')
Expand Down