Skip to content

Commit

Permalink
Fixed solana wallet display name
Browse files Browse the repository at this point in the history
  • Loading branch information
babkenmes committed Dec 13, 2024
1 parent 3afcca8 commit b546429
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 19 deletions.
23 changes: 6 additions & 17 deletions components/WalletProviders/Wagmi.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ import { coinbaseWallet, metaMask, walletConnect } from 'wagmi/connectors'
import { hasInjectedProvider } from '../../lib/wallets/connectors/getInjectedConnector';
import { my_bitget } from '../../lib/wallets/connectors/bitget';
import { isMobile } from '../../lib/isMobile';
import dynamic from 'next/dynamic';

const FuelProviderWrapper = dynamic(() => import("./FuelProvider").then((comp) => comp.default), {
loading: () => null
})
import FuelProviderWrapper from "./FuelProvider";

type Props = {
children: JSX.Element | JSX.Element[]
Expand Down Expand Up @@ -66,18 +62,11 @@ function WagmiComponent({ children }: Props) {
return (
<WagmiProvider config={config} >
<QueryClientProvider client={queryClient}>
{
FuelProviderWrapper ?
<FuelProviderWrapper>
<WalletModalProvider>
{children}
</WalletModalProvider>
</FuelProviderWrapper>
:
<WalletModalProvider>
{children}
</WalletModalProvider>
}
<FuelProviderWrapper>
<WalletModalProvider>
{children}
</WalletModalProvider>
</FuelProviderWrapper>
</QueryClientProvider>
</WagmiProvider >
)
Expand Down
4 changes: 2 additions & 2 deletions lib/wallets/solana/useSolana.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default function useSolana({ network }: { network: Network | undefined })
const wallet: Wallet | undefined = (connectedAddress && connectedAdapterName) ? {
id: connectedAdapterName,
address: connectedAddress,
displayName: `${connectedAdapterName} - ${network?.name || 'Solana'}`,
displayName: `${connectedAdapterName} - ${network?.display_name || 'Solana'}`,
providerName: name,
icon: resolveWalletConnectorIcon({ connector: String(connectedAdapterName), address: connectedAddress, iconUrl: connectedWallet?.adapter.icon }),
disconnect,
Expand Down Expand Up @@ -77,7 +77,7 @@ export default function useSolana({ network }: { network: Network | undefined })
const wallet: Wallet | undefined = connectedAddress && connectedWallet ? {
id: connectedWallet.adapter.name,
address: connectedAddress,
displayName: `${connectedWallet?.adapter.name} - ${network?.name || 'Solana'}`,
displayName: `${connectedWallet?.adapter.name} - ${network?.display_name || 'Solana'}`,
providerName: name,
icon: resolveWalletConnectorIcon({ connector: String(connectedWallet?.adapter.name), address: connectedAddress, iconUrl: connectedWallet?.adapter.icon }),
disconnect,
Expand Down

0 comments on commit b546429

Please sign in to comment.