Closed
Description
Background
项目里面需要限制一下用户的连接,只能连接一次,因为签名的话只会签名当前激活的,后续切换账号的话会遇到权限问题。
但是在 onConnected 里面的 Account 类型目前只支持返回当前激活的地址,如果用户在连接时选择了多个,连接之后是感知不到的。
Proposal
修改 onConnected 里面的 Account 类型添加全部地址,在 wagmi 里面是有现成的,只需要返回就好
const { accounts } = await connectAsync({
connector,
chainId: currentChain?.id,
});
return {
address: accounts?.[0],
// 新增返回
addresses: accounts
};
Additional context
Add any other context or screenshots about the feature request here.