Skip to content

Commit

Permalink
Move the initial handover to be shown only if sufficient
Browse files Browse the repository at this point in the history
  • Loading branch information
mimi-imtbl committed Jul 1, 2024
1 parent ea89b69 commit acbdfeb
Showing 1 changed file with 13 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,19 @@ export function OrderSummary({ subView }: OrderSummaryProps) {
const onPayWithCard = (paymentType: SalePaymentTypes) => goBackToPaymentMethods(paymentType);

const signAndProceed = (tokenAddress?: string) => {
addHandover({
animationUrl: getRemoteRive(
environment,
getRiveAnimationName(TransactionMethod.APPROVE),
),
inputValue:
transactionRiveAnimations[TransactionMethod.APPROVE].inputValues.start,
children: (
<Heading sx={{ px: 'base.spacing.x6' }}>
{t('views.PAYMENT_METHODS.handover.initial')}
</Heading>
),
});
sign(SignPaymentTypes.CRYPTO, tokenAddress);

viewDispatch({
Expand All @@ -78,20 +91,6 @@ export function OrderSummary({ subView }: OrderSummaryProps) {
};

const onProceedToBuy = (fundingBalance: FundingBalance) => {
addHandover({
animationUrl: getRemoteRive(
environment,
getRiveAnimationName(TransactionMethod.APPROVE),
),
inputValue:
transactionRiveAnimations[TransactionMethod.APPROVE].inputValues.start,
children: (
<Heading sx={{ px: 'base.spacing.x6' }}>
{t('views.PAYMENT_METHODS.handover.initial')}
</Heading>
),
});

const { type, fundingItem } = fundingBalance;

sendProceedToPay(
Expand Down

0 comments on commit acbdfeb

Please sign in to comment.