Skip to content

Commit

Permalink
[FRE-1360] fix: update button label and remove unused hook in SwapExe…
Browse files Browse the repository at this point in the history
…cutionButton (#608)

Co-authored-by: Nur Fikri <[email protected]>
  • Loading branch information
ericHgorski and codingki authored Dec 23, 2024
1 parent 38b19cb commit ea59c36
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/gentle-suns-decide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@skip-go/widget': patch
---

Update post tx button to Go again
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

0 comments on commit ea59c36

Please sign in to comment.