diff --git a/packages/page-accounts/src/Sidebar/AccountMenuButtons.tsx b/packages/page-accounts/src/Sidebar/AccountMenuButtons.tsx index b7749e1255..634f65fc32 100644 --- a/packages/page-accounts/src/Sidebar/AccountMenuButtons.tsx +++ b/packages/page-accounts/src/Sidebar/AccountMenuButtons.tsx @@ -7,8 +7,9 @@ import styled from 'styled-components'; import Transfer from '@polkadot/app-accounts/modals/Transfer'; import { useTranslation } from '@polkadot/app-accounts/translate'; import { Button } from '@polkadot/react-components'; -import { useToggle } from '@polkadot/react-hooks'; +import { useApi, useToggle } from '@polkadot/react-hooks'; import { AddressFlags } from '@polkadot/react-hooks/types'; +import { isFunction } from '@polkadot/util'; interface Props { className?: string; @@ -28,6 +29,7 @@ interface Props { function AccountMenuButtons ({ className = '', flags, isEditing, isEditingName, onCancel, onForgetAddress, onSaveName, onSaveTags, onUpdateName, recipientId, toggleIsEditingName, toggleIsEditingTags }: Props): React.ReactElement { const { t } = useTranslation(); const [isTransferOpen, toggleIsTransferOpen] = useToggle(); + const api = useApi(); const _onForgetAddress = useCallback( (): void => { @@ -85,12 +87,14 @@ function AccountMenuButtons ({ className = '', flags, isEditing, isEditingName, ) : ( -