Skip to content

Commit

Permalink
Fix: close tx flow on "View transaction"
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh committed Nov 28, 2023
1 parent 681208b commit 15a71a0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/tx-flow/flows/SuccessScreen/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const SuccessScreen = ({ txId }: { txId: string }) => {
return () => unsubFns.forEach((unsubscribe) => unsubscribe())
}, [txId])

const onFinishClick = useCallback(() => {
const onClose = useCallback(() => {
setTxFlow(undefined)
}, [setTxFlow])

Expand Down Expand Up @@ -71,13 +71,13 @@ export const SuccessScreen = ({ txId }: { txId: string }) => {
<div className={classnames(css.row, css.buttons)}>
{txLink && (
<Link {...txLink} passHref target="_blank" rel="noreferrer" legacyBehavior>
<Button data-testid="view-transaction-btn" variant="outlined" size="small">
<Button data-testid="view-transaction-btn" variant="outlined" size="small" onClick={onClose}>
View transaction
</Button>
</Link>
)}

<Button data-testid="finish-transaction-btn" variant="contained" size="small" onClick={onFinishClick}>
<Button data-testid="finish-transaction-btn" variant="contained" size="small" onClick={onClose}>
Finish
</Button>
</div>
Expand Down

0 comments on commit 15a71a0

Please sign in to comment.