Comments (8)
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.
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.
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.
@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.
Do you get the issue in this CodeSandbox? This is forked directly from our Next.js example. I can't seem to reproduce it.
from rainbowkit.
@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.
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.
@jxom just started working again out of nowhere. Just gave the twitter a follow!
from rainbowkit.
Related Issues (20)
- Unable to connect to Argent Wallet HOT 2
- useChainId returns default chainId even if the current chain is not default. HOT 4
- [bug] fail to detect an installed wallet HOT 6
- [ReferenceError: localStorage is not defined] <Whenever `coinbaseWallet` is used in custom wallet list> HOT 5
- [bug] Once the wallet is connected, it will be disconnected immediately. HOT 3
- [bug] Metamask Issue in IOS Redirection Issue after connect or Sign & Switch Network Doesnt work on mobile HOT 3
- [bug] walletConnectWallet deosn't show in the modal HOT 5
- [bug] Rainbow wallet does not sign a message in Android and iOS. HOT 2
- [bug] <`useConfig` must be used within `WagmiProvider`.> HOT 1
- [bug] <Installed wallets are showing wallets that are not in the connectors array> HOT 2
- [bug] Connect wallet modal MM connect not doing anything HOT 3
- [Fraud, False Adveriting] <Rainbow's Fraud and False Advertising> HOT 5
- [bug] Cannot connect to WalletConnect in Chrome with enabled device toolbar HOT 2
- [bug] Can't connect Rainbow or CB mobile wallets using RainbowKit QR codes HOT 3
- [bug] Bybit wallet integration not working HOT 1
- [bug] Error when using `connectorsForWallets` to create connectors object in `cookieToInitialState` by wagmi HOT 2
- [bug] Touchpad zoom and pan do not work on modals HOT 3
- [bug] process.env breaks Vite-based projects in Dev HOT 1
- [bug] Coinbase wallet QR code scan not showing prompt consistently HOT 1
- Rainbow wallet and metamask QR codes don't display when pressing their tabs [bug] HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rainbowkit.