From ea59c36c3401db3e424defe37192f723d5699db7 Mon Sep 17 00:00:00 2001 From: plubber <51789398+ericHgorski@users.noreply.github.com> Date: Mon, 23 Dec 2024 09:53:49 -0500 Subject: [PATCH] [FRE-1360] fix: update button label and remove unused hook in SwapExecutionButton (#608) Co-authored-by: Nur Fikri --- .changeset/gentle-suns-decide.md | 5 +++++ .../src/pages/SwapExecutionPage/SwapExecutionButton.tsx | 6 ++---- packages/widget/src/stories/MainButton.stories.tsx | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 .changeset/gentle-suns-decide.md diff --git a/.changeset/gentle-suns-decide.md b/.changeset/gentle-suns-decide.md new file mode 100644 index 000000000..7910ea7c0 --- /dev/null +++ b/.changeset/gentle-suns-decide.md @@ -0,0 +1,5 @@ +--- +'@skip-go/widget': patch +--- + +Update post tx button to Go again diff --git a/packages/widget/src/pages/SwapExecutionPage/SwapExecutionButton.tsx b/packages/widget/src/pages/SwapExecutionPage/SwapExecutionButton.tsx index 7d5f3057a..bbedeb978 100644 --- a/packages/widget/src/pages/SwapExecutionPage/SwapExecutionButton.tsx +++ b/packages/widget/src/pages/SwapExecutionPage/SwapExecutionButton.tsx @@ -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; @@ -38,8 +38,6 @@ export const SwapExecutionButton: React.FC = ({ 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: @@ -131,7 +129,7 @@ export const SwapExecutionButton: React.FC = ({ case SwapExecutionState.confirmed: return ( { diff --git a/packages/widget/src/stories/MainButton.stories.tsx b/packages/widget/src/stories/MainButton.stories.tsx index 547c00a69..71d4c89e3 100644 --- a/packages/widget/src/stories/MainButton.stories.tsx +++ b/packages/widget/src/stories/MainButton.stories.tsx @@ -94,7 +94,7 @@ export const SwapAgain: Story = { ); }, args: { - label: "Swap Again", + label: "Go Again", icon: ICONS.checkmark, onClick: () => alert("should trigger"), },