File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
packages/sdk/packages/connected-accounts/src/components/wallet/table/cells Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 11import { Switch , TableCell } from '@mui/material'
2+ import { isDefined } from '@xylabs/typeof'
23import type { ChangeEvent } from 'react'
34import React , { useMemo } from 'react'
45
@@ -12,11 +13,11 @@ export const ConnectedWalletState: React.FC<ConnectedWalletTableCellProps> = ({
1213 disableWallet, enableWallet, wallets,
1314 } = useEnabledWallets ( )
1415
15- const enabled = useMemo ( ( ) => ( walletRdns ? wallets [ walletRdns ] . enabled : false ) , [ wallets , walletRdns ] )
16+ const enabled = useMemo ( ( ) => ( isDefined ( walletRdns ) ? wallets [ walletRdns ] ? .enabled : false ) , [ wallets , walletRdns ] )
1617
1718 const handleClick = ( event : ChangeEvent < HTMLInputElement > ) => {
1819 const checked = event . target ?. checked
19- if ( walletRdns ) {
20+ if ( isDefined ( walletRdns ) ) {
2021 // eslint-disable-next-line @typescript-eslint/no-unused-expressions
2122 checked ? enableWallet ?.( walletRdns ) : disableWallet ?.( walletRdns )
2223 }
You can’t perform that action at this time.
0 commit comments