I've been following along soldev course and I'm now starting to interact with a browser wallet interact-with-wallets. Problem is whenever I try to connect to a wallet it only connects after two clicks. The error on first click is the following: DOMException: Failed to execute 'setItem' on 'Storage': Setting the value of 'walletName' exceeded the quota.

error message

The code I'm using:

import './App.css';
import {WalletContextProvider} from './components/WalletContextProvider';
import {PingButton} from './components/PingButton';
import AppBar from './AppBar';

function App() {
  return (
      {/* <AppBar /> */}
      {/* <PingButton /> */}

export default App;
import { PhantomWalletAdapter } from '@solana/wallet-adapter-phantom'
import { ConnectionProvider, WalletProvider } from '@solana/wallet-adapter-react'
import { WalletModalProvider, WalletMultiButton } from '@solana/wallet-adapter-react-ui'
import { clusterApiUrl } from '@solana/web3.js'
import React, { ReactNode } from 'react'

interface WalletContextProviderProps {
    children: ReactNode

export function WalletContextProvider({children}: WalletContextProviderProps) {
  const endpoint = clusterApiUrl('devnet')
  const wallets = [new PhantomWalletAdapter()]

  return (
    <ConnectionProvider endpoint={endpoint}>
      <WalletProvider wallets={wallets}>
          <WalletMultiButton />
          {/* {children} */}

Following https://github.com/solana-labs/wallet-adapter#ui-components led to the same error

  • I don't see any issues in the code. From the error it seems your local storage space is fully consumed, you can clear the local storage space. Also you can try running the app in another browser to be sure. Oct 4, 2022 at 4:42


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.