Utilities
isLedgerSolanaWallet
React
- Introduction to the SDK
- Changelog
- Configuration
- Upgrade Guides
- SDK/User Loading States
- Providers and Connectors
- UI Components
- Hooks
- Events
- Handlers
- Objects
- Utilities
- Examples
Utilities
isLedgerSolanaWallet
Determine if a given wallet is connected as a Ledger Solana wallet.
import { useDynamicContext } from '@dynamic-labs/sdk-react-core'
import { isLedgerSolanaWallet } from "@dynamic-labs/solana-core";
const App = () => {
const { primaryWallet } = useDynamicContext()
if (primaryWallet && isLedgerSolanaWallet(primaryWallet)) {
/**
* This block will execute if the primaryWallet was connected
* as a Ledger wallet on the Solana blockchain during the
* Dynamic UI connection process.
*/
}
}
Was this page helpful?