-
Notifications
You must be signed in to change notification settings - Fork 479
feat: add button to support in modal blocked address #2884
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,6 +1,8 @@ | ||||||
| import { ExclamationCircleIcon, LogoutIcon, RefreshIcon } from '@heroicons/react/outline'; | ||||||
| import { Trans } from '@lingui/macro'; | ||||||
| import { Box, Button, SvgIcon, Typography } from '@mui/material'; | ||||||
| import { useRootStore } from 'src/store/root'; | ||||||
| import { useShallow } from 'zustand/react/shallow'; | ||||||
|
|
||||||
| import { BasicModal } from './primitives/BasicModal'; | ||||||
|
|
||||||
|
|
@@ -19,7 +21,17 @@ export const AddressBlockedModal = ({ | |||||
| }: AddressBlockedProps) => { | ||||||
| // eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-unused-vars | ||||||
| const setOpen = (_value: boolean) => {}; // ignore, we want the modal to not be dismissable | ||||||
| const [setFeedbackOpen, setSupportPrefillMessage] = useRootStore( | ||||||
| useShallow((state) => [state.setFeedbackOpen, state.setSupportPrefillMessage]) | ||||||
| ); | ||||||
| const handleGetSupport = () => { | ||||||
| const walletAddress = address ? address : 'Address not available'; | ||||||
|
AGMASO marked this conversation as resolved.
|
||||||
| const template = `My wallet seems to be blocked:\n\n"${walletAddress}"`; | ||||||
|
|
||||||
| setSupportPrefillMessage(template); | ||||||
| setFeedbackOpen(true); | ||||||
| close(); | ||||||
|
||||||
| close(); |
Copilot
AI
Mar 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
close() is called in handleGetSupport, but there is no close in scope (no prop and no useModalContext() hook), so this will fail to compile. Either import/use useModalContext (like TxErrorView does) and call its close, or remove the call if the blocked modal is intended to stay open while the Support modal opens.
| close(); |
Uh oh!
There was an error while loading. Please reload this page.