Skip to content

Commit

Permalink
Merge pull request #338 from valory-xyz/fix/remove-broken-new-tag
Browse files Browse the repository at this point in the history
fix: removed broken "New" contract migration tag
  • Loading branch information
truemiller authored Sep 10, 2024
2 parents 3847120 + bc0c70d commit ab3919a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ export const StakingContractTag = ({
}: {
status?: StakingProgramStatus;
}) => {
if (status === StakingProgramStatus.New) {
return <Tag color="blue">New</Tag>;
} else if (status === StakingProgramStatus.Selected) {
if (status === StakingProgramStatus.Selected) {
return <Tag color="purple">Active</Tag>;
}
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,14 +225,11 @@ export const StakingContractSection = ({
if (activeStakingProgram === stakingProgram)
return StakingProgramStatus.Selected;

// Pearl is not staked, set as Selected if default (Beta)
if (!activeStakingProgram && stakingProgram === defaultStakingProgram)
// not staked, set the default as the Selected contract
if (stakingProgram === defaultStakingProgram)
return StakingProgramStatus.Selected;

// Otherwise, highlight Beta as New
if (stakingProgram === StakingProgram.Beta) return StakingProgramStatus.New;

// Otherwise, no tag
// otherwise, no tag
return;
}, [activeStakingProgram, defaultStakingProgram, stakingProgram]);

Expand Down
1 change: 0 additions & 1 deletion frontend/enums/StakingProgramStatus.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export enum StakingProgramStatus {
New = 'new',
Selected = 'current',
}

0 comments on commit ab3919a

Please sign in to comment.