GithubHelp home page GithubHelp logo

Comments (8)

jxom avatar jxom commented on August 11, 2024

wagmi returns null when there is no ENS associated with the given address. Are you sure your ENS has not been transferred to a different address? Does your ENS have a reverse record set up that points to your wallet address? You can check this by entering your wallet address here.

Please provide a reproducible example (or your ENS) if you still can't figure it out.

from rainbowkit.

d2vin avatar d2vin commented on August 11, 2024

Sure the ens name is d2vin.eth.

Here is the brand new next.js app I'm using that's giving me the same result. Do you think it's something to do with server side rendering? Because the ENS feature was working at first

// _app.js 
import "../styles/globals.css";
import "@rainbow-me/rainbowkit/styles.css";

import {
  apiProvider,
  configureChains,
  getDefaultWallets,
  RainbowKitProvider,
} from "@rainbow-me/rainbowkit";
import { chain, createClient, WagmiProvider } from "wagmi";

function MyApp({ Component, pageProps }) {
  const { chains, provider } = configureChains(
    [chain.mainnet, chain.polygon, chain.optimism, chain.arbitrum],
    [apiProvider.alchemy(process.env.ALCHEMY_ID), apiProvider.fallback()]
  );

  const { connectors } = getDefaultWallets({
    appName: "My RainbowKit App",
    chains,
  });

  const wagmiClient = createClient({
    autoConnect: true,
    connectors,
    provider,
  });

  return (
    <WagmiProvider client={wagmiClient}>
      <RainbowKitProvider chains={chains}>
        <Component {...pageProps} />
      </RainbowKitProvider>
    </WagmiProvider>
  );
}

export default MyApp;

// index.js
import Head from "next/head";
import Image from "next/image";
import styles from "../styles/Home.module.css";
import { ConnectButton } from "@rainbow-me/rainbowkit";

export default function Home() {
  return (
    <div className={styles.container}>
      <Head>
        <title>Create Next App</title>
        <meta name="description" content="Generated by create next app" />
        <link rel="icon" href="/favicon.ico" />
      </Head>

      <main className={styles.main}>
        <h1 className={styles.title}>
          Welcome to <a href="https://nextjs.org">Next.js!</a>
        </h1>
        <h1>
          <ConnectButton />
        </h1>
      </main>
    </div>
  );
}

from rainbowkit.

jxom avatar jxom commented on August 11, 2024

The wallet address 0x06B7...DA77 seems to be resolving to d2vin.eth fine for me on rainbowkit.com.

In your example, try move the createClient function out of the MyApp component as creating the client on render could cause some funky state issues:

+...
+const wagmiClient = createClient({ ... });

function MyApp({ Component, pageProps }) {
- ...
- const wagmiClient = createClient({ ... });

  return (
    <WagmiProvider client={wagmiClient}>
      <RainbowKitProvider chains={chains}>
        <Component {...pageProps} />
      </RainbowKitProvider>
    </WagmiProvider>
  )
}

You can also try compare your setup to our Next.js example.

from rainbowkit.

d2vin avatar d2vin commented on August 11, 2024

@jxom followed your suggestion but I'm still getting the same result. I also copied and pasted from the Next.js example you sent only to get the same result.

from rainbowkit.

jxom avatar jxom commented on August 11, 2024

Do you get the issue in this CodeSandbox? This is forked directly from our Next.js example. I can't seem to reproduce it.

Screen Shot 2022-05-16 at 3 28 32 pm

from rainbowkit.

d2vin avatar d2vin commented on August 11, 2024

@jxom This feature is working in the sandbox, but when I take out of the typescript syntax, put it in my own next.js project, and run it in javascript, it doesn't seem to be working. Could this be the issue?

from rainbowkit.

jxom avatar jxom commented on August 11, 2024

Here is the same example using JavaScript: https://codesandbox.io/s/admiring-marco-y9s29r?file=/pages/_app.js

Can't seem to reproduce this, so going to close as I don't think this is an issue directly with RainbowKit. Feel free to DM me on Twitter if you still can't get it working, and I'll be happy to work with you to figure out what's wrong.

from rainbowkit.

d2vin avatar d2vin commented on August 11, 2024

@jxom just started working again out of nowhere. Just gave the twitter a follow!

from rainbowkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.