Skip to content

Commit

Permalink
feat: add toggles for disclaimer
Browse files Browse the repository at this point in the history
  • Loading branch information
CumpsD committed Feb 5, 2024
1 parent 7ac04df commit 8f60fee
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions swappy-bot/Commands/Swap/Swap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -802,15 +802,12 @@ private static MessageComponent BuildIntroButtons(
// ButtonStyle.Secondary,
// helpEmoji)

if (addDisclaimer)
{
builder = builder.WithButton(
"Disclaimer",
$"disclaimer-{stateId}",
ButtonStyle.Secondary,
disclaimerEmoji,
disabled: !swapEnabled);
}
builder = builder.WithButton(
"Disclaimer",
$"disclaimer-{stateId}",
ButtonStyle.Secondary,
disclaimerEmoji,
disabled: !swapEnabled || !addDisclaimer);

return builder.Build();
}
Expand Down Expand Up @@ -875,14 +872,11 @@ private static MessageComponent BuildSwapButtons(
ButtonStyle.Danger,
disabled: !enabled);

if (addDisclaimer)
{
builder = builder.WithButton(
"Disclaimer",
$"disclaimer-final-{stateId}",
ButtonStyle.Secondary,
disabled: !enabled);
}
builder = builder.WithButton(
"Disclaimer",
$"disclaimer-final-{stateId}",
ButtonStyle.Secondary,
disabled: !enabled || !addDisclaimer);

return builder.Build();
}
Expand Down

0 comments on commit 8f60fee

Please sign in to comment.