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

fix: incorrect chains error log #1278

Merged
merged 5 commits into from
Dec 11, 2024

Conversation

Wecle
Copy link
Contributor

@Wecle Wecle commented Dec 6, 2024

💡 Background and solution

image

🔗 Related issue link

#1006

Copy link

vercel bot commented Dec 6, 2024

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

Name Status Preview Comments Updated (UTC)
ant-design-web3 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 11, 2024 4:38am

Copy link

changeset-bot bot commented Dec 6, 2024

🦋 Changeset detected

Latest commit: 904c269

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@ant-design/web3-wagmi Patch
@ant-design/web3-eth-web3js Patch
@ant-design/web3-ethers-v5 Patch
@ant-design/web3-ethers Patch
@example/eth-web3js Patch
@example/ethers-v5 Patch
@example/ethers Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

github-actions bot commented Dec 6, 2024

Preview is ready

Copy link

github-actions bot commented Dec 6, 2024

@Wecle You can run the pnpm changeset command locally to generate a changelog. Please refer to the operation precautions. https://web3.ant.design/guide/changelog

@Wecle 可以在本地运行 pnpm changeset 命令生成 changelog, 操作注意事项参考:https://web3.ant.design/guide/changelog-cn

@Wecle
Copy link
Contributor Author

Wecle commented Dec 9, 2024

在使用 WagmiWeb3ConfigProvider 时如果设置了 config 和 config.chains 而没设置 chains 时是否也应该支持切换链呢?看文档中说是会根据 config 生成 chains 的。但目前看代码中的实现感觉是有点出入的。
image

const chainAssets: ChainAssetWithWagmiChain[] = config

@gin-lsl
Copy link
Collaborator

gin-lsl commented Dec 9, 2024

看文档中说是会根据 config 生成 chains 的

这里的逻辑应该只是为了简化 wagmi config,这里说的 configuration 其实只是 wagmi config,翻译看起来有点歧义。

@gin-lsl
Copy link
Collaborator

gin-lsl commented Dec 10, 2024

看起来没有问题,不过只需要一个 changelog 文件就可以了。

@Wecle Wecle closed this Dec 10, 2024
@Wecle Wecle reopened this Dec 10, 2024
@Wecle
Copy link
Contributor Author

Wecle commented Dec 10, 2024

看起来没有问题,不过只需要一个 changelog 文件就可以了。

多生成了一次。删掉了。: D

@gin-lsl
Copy link
Collaborator

gin-lsl commented Dec 11, 2024

测试用例需要看一下

@gin-lsl gin-lsl merged commit 250e74e into ant-design:main Dec 11, 2024
9 checks passed
Copy link

🎉 Thank you for your contribution! If you have not yet joined our DingTalk community group, please feel free to join us.

🎉 感谢您的贡献!如果您还没有加入钉钉社区群,请扫描下方二维码加入我们。

Ant Design Web3 Community Group QCcode

@yutingzhao1991
Copy link
Collaborator

应该不需要这么改,老的模式下 config.chains 和 chains 都需要同时配置的。chains 配置提供了图标等 UI 相关内容,是不一样的配置。现在推荐直接配置 chains 就可以了,wagmi 的配置会自动生成,就不需要手动配置 config.chains 了。

yutingzhao1991 added a commit that referenced this pull request Dec 16, 2024
@Wecle
Copy link
Contributor Author

Wecle commented Dec 16, 2024

应该不需要这么改,老的模式下 config.chains 和 chains 都需要同时配置的。chains 配置提供了图标等 UI 相关内容,是不一样的配置。现在推荐直接配置 chains 就可以了,wagmi 的配置会自动生成,就不需要手动配置 config.chains 了。

好的。明白了。那这样 #1006 也可以不用处理了吧。

yutingzhao1991 added a commit that referenced this pull request Dec 18, 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.

4 participants