diff --git a/frontend/packages/gasless-transactions/src/components/enable-session/enable-session.tsx b/frontend/packages/gasless-transactions/src/components/enable-session/enable-session.tsx index 6831e2a0f..2ea94b547 100644 --- a/frontend/packages/gasless-transactions/src/components/enable-session/enable-session.tsx +++ b/frontend/packages/gasless-transactions/src/components/enable-session/enable-session.tsx @@ -1,4 +1,5 @@ import { Button, Checkbox } from '@gear-js/vara-ui'; +import { useAccount } from '@gear-js/react-hooks'; import styles from './enable-session.module.css'; import { useGaslessTransactions } from '../..'; import { ReactComponent as GaslessSVG } from '../../assets/icons/gas-station-line.svg'; @@ -9,8 +10,8 @@ type Props = { }; function EnableSession({ type }: Props) { - const { isAvailable, isLoading, isActive, setIsActive } = useGaslessTransactions(); - + const { isAvailable, isLoading, voucherId, setIsActive } = useGaslessTransactions(); + const { account } = useAccount(); const handleSwitcherChange = (e: React.ChangeEvent) => { if (e.target.checked) { setIsActive(true); @@ -27,11 +28,11 @@ function EnableSession({ type }: Props) { setIsActive(false); }; - return ( + return account?.decodedAddress ? ( <> {type === 'button' && ( <> - {isActive ? ( + {voucherId ? (