Algorand WalletConnect连接未在Pera钱包上显示元数据
我正在尝试使用WalletConnect在NextJS应用程序和我的Algorand Wallet(Pera)之间建立工作连接。我可以连接,但是NextJS应用程序不会发送任何元数据,例如DAPP名称。我的代码有问题吗?
import WalletConnect from "@walletconnect/client";
import QRCodeModal from "algorand-walletconnect-qrcode-modal";
export default function Index(props) {
// Create a connector
const connector = new WalletConnect({
bridge: "https://bridge.walletconnect.org", // Required
qrcodeModal: QRCodeModal,
clientMeta: {
description: "WalletConnect NodeJS Client",
url: "https://nodejs.org/en/",
icons: ["https://nodejs.org/static/images/logo.svg"],
name: "WalletConnect"
}
});
// Create a function to connect
let connectWallet = () => {
if (!connector.connected) {
connector.createSession()
}
// ... Event subscriptions down here ...
}
我从简单的 onclick
中调用 connectwallet
函数
return (
<div>
{/* Add button to call connectWallet */}
<button onClick={() => connectWallet()}>Connect Wallet</button>
</div>
);
,它应该从我了解的内容中显示 clientmeta
数据我发送到 connector
,但它只是显示空字符串,而在Pera Wallet应用程序上没有图像。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不幸的是,Pera Wallet的WalletConnect文档似乎并未表明
Clientmeta
的支持。参见和 https:// developer.algorand.org/docs/get-details/walletconnect/
但是,它仍应显示正确的URL。
您可以将您看到的内容与(显示url https://algorand.github.io )
小注意:通常,您可能会通过在
The WalletConnect documentation for Pera Wallet does not seem to indicate support of
clientMeta
unfortunately.See https://github.com/algorandfoundation/ARCs/blob/main/ARCs/arc-0025.md and https://developer.algorand.org/docs/get-details/walletconnect/
However, it should still display the right URL.
You can compare what you see with https://algorand.github.io/walletconnect-example-dapp/ (that displays the URL https://algorand.github.io)
Small note: in general, you may get faster answers by posting Algorand-related questions on https://forum.algorand.org