@@ -27,7 +27,6 @@ import { useMountedRef } from '@/hooks/mount';
2727import { useMediaQuery } from '@/hooks/mediaquery' ;
2828import { SpinnerRingAnimated } from '@/components/spinner/SpinnerAnimation' ;
2929import { Logo } from '@/components/icon' ;
30- import { getAccountNumber } from '@/routes/account/utils' ;
3130import receiverStyles from './receiver-address-input.module.css' ;
3231import styles from './receiver-address-wrapper.module.css' ;
3332
@@ -40,7 +39,6 @@ type Props = {
4039
4140type TReceiverAddressWrapperProps = {
4241 accounts ?: IAccount [ ] ;
43- allAccounts ?: IAccount [ ] ;
4442 error ?: string | object ;
4543 onInputChange : ( value : string ) => void ;
4644 onAccountChange ?: ( account : IAccount | null ) => void ;
@@ -68,24 +66,23 @@ const AccountOption = ({ option, isSelectedValue }: Props) => {
6866
6967export const ReceiverAddressWrapper = ( {
7068 accounts,
71- allAccounts,
7269 error,
7370 onInputChange,
7471 onAccountChange,
7572 recipientAddress,
7673 children,
7774} : TReceiverAddressWrapperProps ) => {
78- const { t, i18n } = useTranslation ( ) ;
75+ const { t } = useTranslation ( ) ;
7976 const mounted = useMountedRef ( ) ;
8077 const isMobile = useMediaQuery ( '(max-width: 768px)' ) ;
8178 const [ selectedAccount , setSelectedAccount ] = useState < TOption < IAccount | null > | null > ( null ) ;
8279 const [ accountSyncStatus , setAccountSyncStatus ] = useState < { [ code : string ] : accountApi . IStatus } > ( { } ) ;
8380
8481 const accountOptions : TAccountOption [ ] = accounts && accounts . length > 0 ? accounts . map ( account => {
85- const accountNumber = getAccountNumber ( account , allAccounts || accounts , i18n . language ) ;
82+ const accountNumber = account . accountNumber ;
8683
8784 return {
88- label : `${ account . name } ${ accountNumber ? `(Account #${ accountNumber } )` : '' } ` ,
85+ label : `${ account . name } ${ accountNumber ? `(Account #${ accountNumber + 1 } )` : '' } ` ,
8986 value : account ,
9087 disabled : ! accountSyncStatus [ account . code ] ?. synced
9188 } ;
0 commit comments