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(solana): support wallet-connect and handle connect error #656

Merged
merged 22 commits into from
Apr 8, 2024

Conversation

gin-lsl
Copy link
Collaborator

@gin-lsl gin-lsl commented Mar 18, 2024

添加 WalletConnect 连接方式,处理连接错误。

测试用例稍后补充。

Copy link

changeset-bot bot commented Mar 18, 2024

🦋 Changeset detected

Latest commit: 26c60f2

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

This PR includes changesets to release 1 package
Name Type
@ant-design/web3-solana Minor

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

vercel bot commented Mar 18, 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 Apr 8, 2024 3:17am

Copy link

github-actions bot commented Mar 18, 2024

Preview is ready

@gin-lsl
Copy link
Collaborator Author

gin-lsl commented Mar 18, 2024

Copy link

codecov bot commented Mar 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (b1b8a46) to head (26c60f2).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #656   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          647       647           
  Lines        19537     19603   +66     
  Branches      1114      1121    +7     
=========================================
+ Hits         19537     19603   +66     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yutingzhao1991
Copy link
Collaborator

我突然想到,有没有可能不用它的这个适配器,感觉它这个有点老了,我们直接用 wallet connect 官方的 https://docs.walletconnect.com/advanced/providers/universal

@@ -43,15 +43,15 @@
"@ant-design/web3-assets": "workspace:*",
"@ant-design/web3-common": "workspace:*",
"@metaplex-foundation/js": "^0.20.1",
"@solana/wallet-adapter-base": "^0.9.23",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

看错了,好像就是指到这个的

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

看错了,好像就是指到这个的

有点乱,代码仓库还转移过组织,来龙去脉有点麻烦 😂

@gin-lsl
Copy link
Collaborator Author

gin-lsl commented Mar 18, 2024

我突然想到,有没有可能不用它的这个适配器,感觉它这个有点老了,我们直接用 wallet connect 官方的 https://docs.walletconnect.com/advanced/providers/universal

可以换成这个,代码会多一点

@gin-lsl
Copy link
Collaborator Author

gin-lsl commented Mar 21, 2024

更新了一波,现在二维码可以适配我们自己的逻辑了。

对 WalletConnect 支持良好的钱包似乎不多?试了几个,Trust 的体验最好。。

@jeasonstudio jeasonstudio changed the title feat(solana): Support WalletConnect and handle connect error feat(solana): support wallet-connect and handle connect error Mar 26, 2024
@jeasonstudio
Copy link
Collaborator

Changeset needs to be included

export class WalletConnectWalletAdapter extends BaseSignerWalletAdapter {
name = WalletConnectWalletName;
url = 'https://walletconnect.org';
icon =
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是 walletConnect 的 icon 吗?能不能用 web3-icons 里面的 icon?

@gin-lsl
Copy link
Collaborator Author

gin-lsl commented Mar 26, 2024

Changeset needs to be included

done


export const CoinbaseWallet = () =>
WalletFactory(new CoinbaseWalletAdapter(), metadata_CoinbaseWallet);

export const PhantomWallet = () => WalletFactory(new PhantomWalletAdapter(), metadata_Phantom);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

phantom 钱包可以支持 wallet connect 吗?

image

@jeasonstudio
Copy link
Collaborator

#750
可以在这个 PR 里加一下 OKX Wallet 支持 @gin-lsl

@gin-lsl
Copy link
Collaborator Author

gin-lsl commented Apr 7, 2024

#750 可以在这个 PR 里加一下 OKX Wallet 支持 @gin-lsl

OKX 实现了 Standard Wallet 标准,适配起来还是需要比较多代码的,建议分开提交

@jeasonstudio jeasonstudio merged commit 84181a8 into main Apr 8, 2024
12 checks passed
@jeasonstudio jeasonstudio deleted the feat/solana-walletconnect branch April 8, 2024 03:19
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.

None yet

4 participants