Skip to content

Commit

Permalink
Fix stripe modal opening behavior (#3914)
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondjacobson committed Aug 21, 2023
1 parent a3219c3 commit bc0226f
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import {
buyAudioActions,
buyAudioSelectors,
stripeModalUIActions,
OnRampProvider
OnRampProvider,
modalsActions
} from '@audius/common'
import { useDispatch, useSelector } from 'react-redux'

Expand All @@ -13,6 +14,7 @@ import Tooltip from 'components/tooltip/Tooltip'
import { getRootSolanaAccount } from 'services/audius-backend/BuyAudio'

import styles from './StripeBuyAudioButton.module.css'
const { setVisibility } = modalsActions

const { getAudioPurchaseInfo } = buyAudioSelectors
const { onrampOpened, onrampSucceeded, onrampCanceled } = buyAudioActions
Expand Down Expand Up @@ -51,6 +53,7 @@ export const StripeBuyAudioButton = () => {
destinationWallet
})
)
dispatch(setVisibility({ modal: 'StripeOnRamp', visible: true }))
} catch (e) {
dispatch(onrampCanceled())
console.error(e)
Expand Down

0 comments on commit bc0226f

Please sign in to comment.