Skip to content

Commit

Permalink
Merge pull request #296 from dappnode/smooth-fee-case-sensitive-fixed
Browse files Browse the repository at this point in the history
Smooth FR case sensitive fix
  • Loading branch information
Marketen authored Feb 23, 2024
2 parents 8cdb335 + aa4aace commit 8cc8c44
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/ui/src/components/Dialogs/EditFeesDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export default function FeeRecipientDialog({
if (
mevSpAddress &&
!isMevSpAddressSelected &&
event.target.value === mevSpAddress
event.target.value.toLowerCase() === mevSpAddress.toLocaleLowerCase()
) {
switchSetMevSpAddress();
} else {
Expand Down
12 changes: 6 additions & 6 deletions packages/ui/src/components/ValidatorList/SmoothStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default function SmoothStatus({
//Helper functions for rendering healthy oracle statuses
const renderSubscriptionStatusIcon = (status: string) => {
let icon, tooltipText;

switch (status) {
case MevSpSubscriptionStatus.ACTIVE:
icon = <CheckCircle style={{ color: "green" }} />;
Expand All @@ -72,14 +72,14 @@ export default function SmoothStatus({
tooltipText = "Unknown Status. Something went wrong."; // we should never get here
break;
}

return (
<Tooltip title={tooltipText}>
{icon}
</Tooltip>
);
};


// RENDERING LOGIC

Expand Down Expand Up @@ -110,21 +110,21 @@ export default function SmoothStatus({
if (
// healthy pending_subscription. Good withdrawal address format and fee recipient
subscriptionStatus.toLowerCase() === "notsubscribed" &&
feeRecipient === mevSpAddress &&
feeRecipient.toLowerCase() === mevSpAddress?.toLowerCase() &&
withdrawalFormat === "ecdsa"
) {
return renderAwaitingSubscription();

// unhealthy pending_subscription/subscription. Wrong withdrawal address format
} else if (feeRecipient === mevSpAddress && withdrawalFormat !== "ecdsa") {
} else if (feeRecipient.toLowerCase() === mevSpAddress?.toLowerCase() && withdrawalFormat !== "ecdsa") {
return renderWrongWithdrawalAddressFormat();

// unhealthy subscription. Wrong fee recipient
} else if (
(subscriptionStatus.toLowerCase() === "active" ||
subscriptionStatus.toLowerCase() === "yellowcard" ||
subscriptionStatus.toLowerCase() === "redcard") &&
rowData.row.feeRecipient !== mevSpAddress
rowData.row.feeRecipient.toLowerCase() !== mevSpAddress?.toLowerCase()
) {
return renderWrongFeeRecipient();

Expand Down

0 comments on commit 8cc8c44

Please sign in to comment.