-
Notifications
You must be signed in to change notification settings - Fork 150
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: Add support for Tron #1258
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: 267c262 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@tanstack/[email protected], npm/@tanstack/[email protected], npm/@tanstack/[email protected], npm/@testing-library/[email protected], npm/@tiplink/[email protected], npm/@tonconnect/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected] |
@@ -0,0 +1,38 @@ | |||
import React, { useState } from 'react'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个文件夹下两个组件的大小写不一致,统一为大驼峰吧
@@ -0,0 +1 @@ | |||
# @ant-design/web3-tron |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
readme 简单写一个
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
packages/tron/package.json
Outdated
@@ -0,0 +1,67 @@ | |||
{ | |||
"name": "@ant-design/web3-tron", | |||
"version": "1.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个改为 0.0.1,新增一个 changlog,然后发布的时候就会发布为 1.0.0 版本
export * from './provider'; | ||
export * from './wallets/types'; | ||
export * from './wallets/okxTronWallet'; | ||
export { useWallet } from '@tronweb3/tronwallet-adapter-react-hooks'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个里面都有些什么 hooks?如果是我们依赖了 @tronweb3/tronwallet-adapter-react-hooks 这个,但是又需要暴露给用户用,是不是把 @tronweb3/tronwallet-adapter-react-hooks 中的内容全部通过 @ant-design/web3-tron/hooks
暴露出去?
可以讨论一下。
@@ -0,0 +1,14 @@ | |||
import { ConnectButton, Connector } from '@ant-design/web3'; | |||
import { okxTronWallet, tronWallets, TronWeb3ConfigProvider } from '@ant-design/web3-tron'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tronWallets 是复数?
<code src='./demos/message.tsx'></code> | ||
|
||
## Sign Transaction | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
文档 API 补充一下
🚨 @Likang0122, 本次 PR 的更改包含 major 变更,请确认是否符合预期。🚨 @Likang0122, this PR contains major changes, please confirm if it is as expected.+'@ant-design/web3-tron': major
|
@@ -77,6 +77,7 @@ export * from './components/bitcoin-circle-colorful'; | |||
export * from './components/bitcoin-circle-filled'; | |||
export * from './components/bitcoin-colorful'; | |||
export * from './components/bitcoin-filled'; | |||
export * from './components/bitget-wallet-colorful'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
感觉 icon 单独抽一个 pr 比较好,会让这个 pr review 起来更加轻松,变更文件更少。之前也都是这么做的。
@@ -0,0 +1 @@ | |||
# @ant-design/web3-tron |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
packages/tron/src/wallets/types.ts
Outdated
// import type { Wallet, WalletMetadata } from '@ant-design/web3-common'; | ||
|
||
// export interface WalletFactory { | ||
// create: () => Wallet; | ||
// } | ||
|
||
// export type WalletFactoryBuilder = (metadata: WalletMetadata) => WalletFactory; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// import type { Wallet, WalletMetadata } from '@ant-design/web3-common'; | |
// export interface WalletFactory { | |
// create: () => Wallet; | |
// } | |
// export type WalletFactoryBuilder = (metadata: WalletMetadata) => WalletFactory; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
132f9b8
to
7e411fb
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1258 +/- ##
==========================================
- Coverage 99.99% 98.58% -1.41%
==========================================
Files 858 869 +11
Lines 14726 14963 +237
Branches 1589 1599 +10
==========================================
+ Hits 14725 14752 +27
- Misses 1 211 +210 ☔ View full report in Codecov by Sentry. |
[中文版模板 / Chinese template]
💡 Background and solution
Add support for Tron
🔗 Related issue link
#1051