Skip to content

Commit

Permalink
fix: correct step title
Browse files Browse the repository at this point in the history
  • Loading branch information
chybisov committed Nov 23, 2022
1 parent d837b47 commit 5024614
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/widget/src/components/Step/Step.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@ export const Step: React.FC<{
const getCardTitle = () => {
switch (step.type) {
case 'lifi':
if (step.includedSteps.some((step) => step.type === 'cross')) {
return t('swap.stepSwapAndBridge');
if (step.includedSteps.every((step) => step.type === 'cross')) {
return t('swap.stepBridge');
}
return t('swap.stepSwap');
if (step.includedSteps.every((step) => step.type === 'swap')) {
return t('swap.stepSwap');
}
return t('swap.stepSwapAndBridge');
case 'swap':
return t('swap.stepSwap');
case 'cross':
Expand Down

0 comments on commit 5024614

Please sign in to comment.