Skip to content

Commit

Permalink
fix(sell): remove sell currency check for payment info
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLeoB committed Dec 10, 2020
1 parent aac4392 commit 92bf16e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const getDisplayBack = (state: RootState) =>
export const getFiatCurrency = (state: RootState) =>
state.components.simpleBuy.fiatCurrency || state.preferences.sbFiatCurrency

const eligableFiatCurrency = currency =>
export const eligableFiatCurrency = currency =>
currency === FiatTypeEnum.USD ||
currency === FiatTypeEnum.GBP ||
currency === FiatTypeEnum.EUR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,30 @@ import { Icon } from 'blockchain-info-components'
import { Props } from '../template.success'
import React from 'react'

const Payment: React.FC<Props> = props => {
return (
<PaymentContainer
role='button'
data-e2e='paymentMethodSelect'
onClick={() => {
props.simpleBuyActions.setStep({
step: 'PAYMENT_METHODS',
pair: props.pair,
fiatCurrency: props.fiatCurrency || 'USD',
cryptoCurrency: props.cryptoCurrency
})
}}
isMethod={!!props.method}
>
<DisplayPaymentIcon showBackground={!props.method}>
{getIcon(props.method)}
</DisplayPaymentIcon>
<PaymentText isMethod={!!props.method}>
{getText(props.method, props.sbBalances)}
</PaymentText>
<PaymentArrowContainer>
<Icon cursor name='arrow-right' size='20px' color='grey600' />
</PaymentArrowContainer>
</PaymentContainer>
)
}
const Payment: React.FC<Props> = props => (
<PaymentContainer
role='button'
data-e2e='paymentMethodSelect'
onClick={() => {
props.simpleBuyActions.setStep({
step: 'PAYMENT_METHODS',
pair: props.pair,
fiatCurrency: props.fiatCurrency || 'USD',
cryptoCurrency: props.cryptoCurrency
})
}}
isMethod={!!props.method}
>
<DisplayPaymentIcon showBackground={!props.method}>
{getIcon(props.method)}
</DisplayPaymentIcon>
<PaymentText isMethod={!!props.method}>
{getText(props.method, props.sbBalances)}
</PaymentText>
<PaymentArrowContainer>
<Icon cursor name='arrow-right' size='20px' color='grey600' />
</PaymentArrowContainer>
</PaymentContainer>
)

export default Payment
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,7 @@ const mapDispatchToProps = dispatch => ({

const connector = connect(mapStateToProps, mapDispatchToProps)

export type OwnProps = EnterAmountOwnProps &
EnterAmountSuccessStateType & { sellCurrencyAvailable: boolean }
export type OwnProps = EnterAmountOwnProps & EnterAmountSuccessStateType
export type SuccessStateType = ReturnType<typeof getData>['data'] & {
formErrors: { amount?: 'ABOVE_MAX' | 'BELOW_MIN' | boolean }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const Success: React.FC<Props> = props => {
.includes(props.walletCurrency))

return isUserEligible && sellCurrencyAvailable ? (
<Checkout {...props} sellCurrencyAvailable={sellCurrencyAvailable} />
<Checkout {...props} />
) : (
<Unsupported {...props} />
)
Expand Down

0 comments on commit 92bf16e

Please sign in to comment.