Skip to content

Commit 6644967

Browse files
committed
Add close icon
1 parent c4c810e commit 6644967

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

app/components/Views/confirmations/components/modals/pay-with-modal/pay-with-modal.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,20 @@ export function PayWithModal() {
1717
const requiredTokens = useTransactionPayRequiredTokens();
1818
const bottomSheetRef = useRef<BottomSheetRef>(null);
1919

20+
const handleClose = useCallback(() => {
21+
bottomSheetRef.current?.onCloseBottomSheet();
22+
}, []);
23+
2024
const handleTokenSelect = useCallback(
2125
(token: AssetType) => {
2226
setPayToken({
2327
address: token.address as Hex,
2428
chainId: token.chainId as Hex,
2529
});
2630

27-
bottomSheetRef.current?.onCloseBottomSheet();
31+
handleClose();
2832
},
29-
[setPayToken],
33+
[handleClose, setPayToken],
3034
);
3135

3236
const getAvailableTokens = useCallback(
@@ -92,7 +96,9 @@ export function PayWithModal() {
9296

9397
return (
9498
<BottomSheet isFullscreen ref={bottomSheetRef}>
95-
<BottomSheetHeader>{strings('pay_with_modal.title')}</BottomSheetHeader>
99+
<BottomSheetHeader onClose={handleClose}>
100+
{strings('pay_with_modal.title')}
101+
</BottomSheetHeader>
96102
<Asset
97103
includeNoBalance
98104
hideNfts

0 commit comments

Comments
 (0)