Skip to content

Commit e660d17

Browse files
committed
frontend/receive: remove useless var
1 parent 7ef67cb commit e660d17

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

frontends/web/src/routes/account/receive/receive.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,8 @@ export const Receive = ({
7676
const availableScriptTypes = useRef<accountApi.ScriptType[]>();
7777

7878
const hasManyScriptTypes = availableScriptTypes.current && availableScriptTypes.current.length > 1;
79-
const addressTypeDialogOpened = !!(addressTypeDialog && (hasManyScriptTypes || insured));
8079

81-
useEsc(() => !addressTypeDialogOpened && !verifying && route(`/account/${code}`));
80+
useEsc(() => addressTypeDialog === undefined && !verifying && route(`/account/${code}`));
8281

8382
useEffect(() => {
8483
if (receiveAddresses) {
@@ -211,7 +210,7 @@ export const Receive = ({
211210
</button>
212211
)}
213212
<form onSubmit={handleSubmit}>
214-
<Dialog open={addressTypeDialogOpened} onClose={() => setAddressTypeDialog(undefined)} medium title={t('receive.changeScriptType')} >
213+
<Dialog open={addressTypeDialog !== undefined} onClose={() => setAddressTypeDialog(undefined)} medium title={t('receive.changeScriptType')} >
215214
{availableScriptTypes.current && availableScriptTypes.current.map((scriptType, i) => (
216215
<div key={scriptType}>
217216
{addressTypeDialog && (

0 commit comments

Comments
 (0)