Skip to main content

react/interfaces/WalletProviderProps.md

The props of the WalletProvider component.

Properties​

PropertyTypeDescription
autoConnect?booleanConnect initialProvider on mount, once (default: true). A wallet-backed provider is restored silently (restore(), no wallet prompt; with no account to restore the context stays not connected, without an error), so a page reload after an earlier connection reconnects without a prompt. A provider that has no restore() is connected with connect(). Connect a wallet that needs the user's approval with connect() from a user action.
autoDetect?booleanDetect wallets on mount (default: true in a browser).
children?ReactNodeThe app below the provider.
initialProvider?WalletProviderA provider to start with.
onConnect?(address, provider) => voidCalled after a connection succeeds.
onDisconnect?() => voidCalled after the provider disconnects (by the app or by the wallet).
onError?(error) => voidCalled when a connection fails.