Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FRE-1360] fix: update button label and remove unused hook in SwapExecutionButton #608

Merged
merged 2 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { Modals } from "@/modals/registerModals";
import { RouteResponse } from "@skip-go/client";
import { ClientOperation } from "@/utils/clientType";
import { GoFastSymbol } from "@/components/GoFastSymbol";
import { useIsGoFast, useIsSwapOperation } from "@/hooks/useIsGoFast";
import { useIsGoFast } from "@/hooks/useIsGoFast";

type SwapExecutionButtonProps = {
swapExecutionState: SwapExecutionState | undefined;
Expand All @@ -38,8 +38,6 @@ export const SwapExecutionButton: React.FC<SwapExecutionButtonProps> = ({
const setCurrentPage = useSetAtom(currentPageAtom);
const clearAssetInputAmounts = useSetAtom(clearAssetInputAmountsAtom);
const isGoFast = useIsGoFast(route);
const isSwapOperation = useIsSwapOperation(route);
const operationText = isSwapOperation ? "Swap" : "Send";

switch (swapExecutionState) {
case SwapExecutionState.recoveryAddressUnset:
Expand Down Expand Up @@ -131,7 +129,7 @@ export const SwapExecutionButton: React.FC<SwapExecutionButtonProps> = ({
case SwapExecutionState.confirmed:
return (
<MainButton
label={`${operationText} again`}
label="Go again"
icon={ICONS.checkmark}
backgroundColor={theme.success.text}
onClick={() => {
Expand Down
2 changes: 1 addition & 1 deletion packages/widget/src/stories/MainButton.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export const SwapAgain: Story = {
);
},
args: {
label: "Swap Again",
label: "Go Again",
icon: ICONS.checkmark,
onClick: () => alert("should trigger"),
},
Expand Down
Loading