Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: getChains for custom rainbowkit chains (wagmi v2) #1710

Closed
wants to merge 1 commit into from

Conversation

magiziz
Copy link
Contributor

@magiziz magiziz commented Jan 16, 2024

Changes

  • Created getChains to create custom chains with iconUrl and iconBackground option
  • Used getChains to have similar name as getDefaultWallets and getDefaultConfig

Screen recordings / screenshots

custom_chains.mov

What to test

  • Test with getDefaultConfig:
const chains = getChains([
  { ...mainnet, iconUrl: "<icon_url>", iconBackground: "<icon_background>" },
  { ...polygon, iconUrl: "<icon_url>", iconBackground: "<icon_background>" },
]);

const config = getDefaultConfig({
  appName: "RainbowKit Demo",
  projectId,
  chains
});
  • Test with createConfig:
const chains = getChains([
  { ...mainnet, iconUrl: "<icon_url>", iconBackground: "<icon_background>" },
  { ...polygon, iconUrl: "<icon_url>", iconBackground: "<icon_background>" },
]);

const config = createConfig({
  chains,
  transports: {
    [mainnet.id]: http(),
    [polygon.id]: http(),
  },
});

Copy link

vercel bot commented Jan 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rainbowkit-example ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 22, 2024 9:50pm
rainbowkit-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 22, 2024 9:50pm

@magiziz
Copy link
Contributor Author

magiziz commented Feb 5, 2024

Closing this since we went with another approach

@magiziz magiziz closed this Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants