diff --git a/ts/components/wallet/card/CardComponent.tsx b/ts/components/wallet/card/CardComponent.tsx index d4b6602877a..fb3235f7ea7 100644 --- a/ts/components/wallet/card/CardComponent.tsx +++ b/ts/components/wallet/card/CardComponent.tsx @@ -35,7 +35,6 @@ interface FullCommonProps extends BaseProps { extraSpace?: boolean; hideFavoriteIcon?: boolean; onDelete?: () => void; - showPsp?: boolean; } interface FullProps extends FullCommonProps { @@ -108,7 +107,7 @@ export default class CardComponent extends React.Component { if ( this.props.type === "Preview" || this.props.type === "Picking" || - (this.props.type === "Full" && this.props.showPsp) + this.props.type === "Full" ) { const { wallet } = this.props; return ( @@ -118,7 +117,7 @@ export default class CardComponent extends React.Component { ); } - if (this.props.type === "Full" || this.props.type === "Header") { + if (this.props.type === "Header") { const { hideFavoriteIcon, isFavorite, @@ -186,37 +185,25 @@ export default class CardComponent extends React.Component { } private renderBody(creditCard: CreditCard) { - const { type, wallet } = this.props; - - const getBodyIcon = () => { - if ( - this.props.type === "Picking" || - (this.props.type === "Full" && this.props.showPsp) - ) { - return wallet.psp ? ( - - - - ) : ( - - - - ); - } - return ( - - - - ); - }; + const { type } = this.props; if (type === "Preview") { return null; } + // Right icon, basically needed for the sole "Header" variant + const getBodyIcon = () => { + switch (type) { + case "Picking": + case "Full": + return null; + case "Header": + return ( + + + + ); + } + }; const expirationDate = buildExpirationDate(creditCard); const isExpired = isExpiredCard(creditCard); diff --git a/ts/screens/wallet/payment/ConfirmPaymentMethodScreen.tsx b/ts/screens/wallet/payment/ConfirmPaymentMethodScreen.tsx index 94c7230e5c7..6be24563618 100644 --- a/ts/screens/wallet/payment/ConfirmPaymentMethodScreen.tsx +++ b/ts/screens/wallet/payment/ConfirmPaymentMethodScreen.tsx @@ -150,7 +150,6 @@ class ConfirmPaymentMethodScreen extends React.Component { wallet={wallet} hideMenu={true} hideFavoriteIcon={true} - showPsp={true} /> {wallet.psp === undefined ? ( diff --git a/ts/screens/wallet/payment/PickPaymentMethodScreen.tsx b/ts/screens/wallet/payment/PickPaymentMethodScreen.tsx index a8d759ee69d..5477af546ca 100644 --- a/ts/screens/wallet/payment/PickPaymentMethodScreen.tsx +++ b/ts/screens/wallet/payment/PickPaymentMethodScreen.tsx @@ -111,7 +111,7 @@ class PickPaymentMethodScreen extends React.Component { dataArray={wallets as any[]} // eslint-disable-line renderRow={(item): React.ReactElement => (