Skip to content

Commit

Permalink
[PAY-2213] Fix closing Add Funds modal (#6814)
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondjacobson authored Nov 30, 2023
1 parent 28d7f35 commit f519ae2
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/web/src/components/add-funds-modal/AddFundsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ export const AddFundsModal = () => {

const [page, setPage] = useState<Page>('add-funds')

const handleClose = useCallback(() => {
setPage('add-funds')
}, [setPage])

const handleClosed = useCallback(() => {
setPage('add-funds')
}, [setPage])
Expand All @@ -64,7 +60,7 @@ export const AddFundsModal = () => {
<ModalDrawer
zIndex={zIndex.ADD_FUNDS_MODAL}
size={'small'}
onClose={handleClose}
onClose={onClose}
isOpen={isOpen}
onClosed={handleClosed}
bodyClassName={styles.modal}
Expand All @@ -91,7 +87,7 @@ export const AddFundsModal = () => {
{page === 'add-funds' ? (
<AddFunds onContinue={handleContinue} />
) : (
<USDCManualTransfer onClose={handleClose} />
<USDCManualTransfer onClose={() => setPage('add-funds')} />
)}
</ModalContent>
</ModalDrawer>
Expand Down

0 comments on commit f519ae2

Please sign in to comment.