Skip to content

Commit 70f3cd4

Browse files
authored
Merge pull request #32 from tronweb3/release/v1.2.7
Release/v1.2.7
2 parents e2ab045 + d919b79 commit 70f3cd4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+574
-332
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
The MIT License (MIT)
2-
Copyright (c) 2022-Present, web3-geek
2+
Copyright (c) 2022-Present, tronweb3
33

44
Permission is hereby granted, free of charge, to any person obtaining a copy
55
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ This repository contains wallet adapters and components for Tron DApps. With out
2525
| |Browser Extension | Not Support |
2626
| [gate.io](https://www.gate.io/web3) | Android | >= 6.30.10 |
2727
| | IOS | >= 6.20.1 |
28-
| |Browser Extension | Not Support |
28+
| |Browser Extension | >= 2.35.2 |
2929
| [FoxWallet](https://foxwallet.com/) | Android | >= 5.3.1 |
3030
| | IOS | >= 5.3.1 |
3131
| |Browser Extension | Not Support |
@@ -35,7 +35,7 @@ This repository contains wallet adapters and components for Tron DApps. With out
3535
| [Ledger](https://www.ledger.com/) | - | All versions |
3636
| [WalletConnect](https://walletconnect.org) | - | >= v2.0 |
3737

38-
> **Note**: In case wallet developers intend to release breaking changes, you can [open an issue here](https://github.com/web3-geek/tronwallet-adapter/issues/new) to inform us, thus enabling us to update the new protocols accordingly.
38+
> **Note**: In case wallet developers intend to release breaking changes, you can [open an issue here](https://github.com/tronweb3/tronwallet-adapter/issues/new) to inform us, thus enabling us to update the new protocols accordingly.
3939
4040
### Add support for new wallet
4141
Follow these steps to support new wallets:
@@ -222,7 +222,7 @@ You can use the `@tronweb3/tronwallet-adapters` package, or add the individual w
222222
| [bitkeep](https://bitkeep.com/) | Adapter for BitKeep extension and BitKeep App(IOS and Android) | [`@tronweb3/tronwallet-adapter-bitkeep`](https://www.npmjs.com/package/@tronweb3/tronwallet-adapter-bitkeep) |
223223
| [okxwallet](https://www.okx.com/) | Adapter for Okx Wallet extension and App(Android) | [`@tronweb3/tronwallet-adapter-okxwallet`](https://www.npmjs.com/package/@tronweb3/tronwallet-adapter-okxwallet) |
224224
| [imtoken](https://token.im/) | Adapter for imToken Wallet App(IOS and Android) | [`@tronweb3/tronwallet-adapter-imtoken`](https://www.npmjs.com/package/@tronweb3/tronwallet-adapter-imtoken) |
225-
| [gatewallet](https://www.gate.io/web3) | Adapter for gate.io Wallet App(IOS and Android) | [`@tronweb3/tronwallet-adapter-gatewallet`](https://www.npmjs.com/package/@tronweb3/tronwallet-adapter-gatewallet) |
225+
| [gatewallet](https://www.gate.io/web3) | Adapter for gate.io Wallet App(IOS and Android) and Extension | [`@tronweb3/tronwallet-adapter-gatewallet`](https://www.npmjs.com/package/@tronweb3/tronwallet-adapter-gatewallet) |
226226
| [foxwallet](https://foxwallet.com/) | Adapter for Fox Wallet App(IOS and Android) | [`@tronweb3/tronwallet-adapter-foxwallet`](https://www.npmjs.com/package/@tronweb3/tronwallet-adapter-foxwallet) |
227227
| [bybit](https://www.bybit.com/en/web3/home) | Adapter for Bybit Wallet App(IOS and Android) and Extension | [`@tronweb3/tronwallet-adapter-bybit`](https://www.npmjs.com/package/@tronweb3/tronwallet-adapter-bybit) |
228228

@@ -453,7 +453,7 @@ Welcome to contribute your idea!
453453
454454
1. Fork the repo and clone to your device.
455455
```bash
456-
git clone https://github.com/web3-geek/tronwallet-adapter.git
456+
git clone https://github.com/tronweb3/tronwallet-adapter.git
457457
```
458458
2. Install Nodejs@18.x and pnpm@9.x
459459
3. Install dependencies

demos/dev-demo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"lit-html": "^3.0.0",
3535
"react": "^18.2.0",
3636
"react-dom": "^18.2.0",
37-
"tronweb": "~5.3.2",
37+
"tronweb": "^6.0.0",
3838
"vconsole": "^3.15.1"
3939
},
4040
"devDependencies": {

demos/dev-demo/src/AdapterBasicTest.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export const AdapterBasicTest = memo(function AdapterBasicTest() {
129129
<Box>
130130
<Box sx={{ display: 'flex', flexDirection: 'row', alignItems: 'center' }}>
131131
<Typography gutterBottom>Select the Adapter:</Typography>
132-
<Select style={{ marginLeft: 15 }} size="small" value={selectedName} label="Select Adapter" onChange={handleChange}>
132+
<Select style={{ marginLeft: 15 }} size="small" value={selectedName} onChange={handleChange}>
133133
{Items}
134134
</Select>
135135
</Box>
@@ -179,7 +179,7 @@ const SectionSign = memo(function SectionSign({ adapter, connectState }: { adapt
179179
const [signedMessage, setSignedMessage] = useState('');
180180

181181
async function onSignTransaction() {
182-
const transaction = await tronWeb.transactionBuilder.sendTrx(receiver, tronWeb.toSun(0.000001), adapter.address);
182+
const transaction = await tronWeb.transactionBuilder.sendTrx(receiver, tronWeb.toSun(0.000001) as unknown as number, adapter.address!);
183183
const signedTransaction = await adapter.signTransaction(transaction);
184184
// const signedTransaction = await tronWeb.trx.sign(transaction);
185185
const res = await tronWeb.trx.sendRawTransaction(signedTransaction);
@@ -249,7 +249,6 @@ const SectionSwitchChain = memo(function SectionSwitchChain({ adapter }: { adapt
249249
labelId="demo-simple-select-label"
250250
id="demo-simple-select"
251251
value={selectedChainId}
252-
label="Chain"
253252
size="small"
254253
onChange={(e) => setSelectedChainId(e.target.value)}
255254
>

demos/dev-demo/src/LedgerDemo/ConnectedSection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export function ConnectedSection(props: { adapter: LedgerAdapter }) {
2525
[signMessage, signedMessage, props.adapter]
2626
);
2727
async function onSignTransaction() {
28-
const transaction = await tronWeb.transactionBuilder.sendTrx(receiver, tronWeb.toSun(0.000001), props.adapter.address);
28+
const transaction = await tronWeb.transactionBuilder.sendTrx(receiver, tronWeb.toSun(0.000001) as unknown as number, props.adapter.address!);
2929
const signedTransaction = await props.adapter.signTransaction(transaction);
3030
const res = await tronWeb.trx.sendRawTransaction(signedTransaction);
3131
setOpen(true);

demos/dev-demo/src/TronLinkAdapterDemo.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ function MultiSignDemo(props: { address: string; adapter: Adapter }) {
220220
activePermission.keys.push({ address: ownerAddress, weight: 1 });
221221
activePermission.keys.push({ address: tronWeb.address.toHex(address1), weight: 1 });
222222

223-
const updateTransaction = await tronWeb.transactionBuilder.updateAccountPermissions(ownerAddress, ownerPermission, null, [activePermission]);
223+
const updateTransaction = await tronWeb.transactionBuilder.updateAccountPermissions(ownerAddress, ownerPermission, undefined, [activePermission]);
224224
const signed = await props.adapter.signTransaction(updateTransaction);
225225
const res = await tronWeb.trx.sendRawTransaction(signed);
226226
alert('update successfully.');
@@ -231,7 +231,7 @@ function MultiSignDemo(props: { address: string; adapter: Adapter }) {
231231

232232
const multiSignWithAddress1 = useCallback(
233233
async function () {
234-
const transaction = await tronWeb.transactionBuilder.sendTrx(receiver, tronWeb.toSun(0.000001), props.address, { permissionId: 2 });
234+
const transaction = await tronWeb.transactionBuilder.sendTrx(receiver, tronWeb.toSun(0.000001) as unknown as number, props.address, { permissionId: 2 });
235235
const signedTransaction = await props.adapter.multiSign(transaction, null, 2);
236236
setTransferTransaction(signedTransaction);
237237
},
@@ -252,7 +252,7 @@ function MultiSignDemo(props: { address: string; adapter: Adapter }) {
252252
[transferTransaction, setTransferTransaction, setCanSend, props.adapter]
253253
);
254254
async function broadcast() {
255-
const res = await tronWeb.trx.broadcast(transferTransaction);
255+
const res = await tronWeb.trx.broadcast(transferTransaction!);
256256
setOpen(true);
257257
}
258258
return (

demos/dev-demo/src/tronweb.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// @ts-ignore
2-
import TronWeb from 'tronweb';
2+
import { TronWeb } from 'tronweb';
33

44
export const tronWeb = new TronWeb({
55
// fullHost: 'https://api.nileex.io',

demos/react-ui/vite-app/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# adapter-demo-react
22

3-
This is the demo of `@tronweb3/tronwallet-adapter-react-ui`. Please refer the introduction [here](https://github.com/web3-geek/tronwallet-adapter/blob/main/packages/react/react-ui/README.md).
3+
This is the demo of `@tronweb3/tronwallet-adapter-react-ui`. Please refer the introduction [here](https://github.com/tronweb3/tronwallet-adapter/blob/main/packages/react/react-ui/README.md).
44

55
## Start
66

package.json

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "tronwallet-adapter",
33
"description": "wallet adapters for TRON blockchain",
4-
"version": "1.2.6",
4+
"version": "1.2.7",
55
"main": "index.js",
66
"sideEffects": false,
77
"private": true,
@@ -11,10 +11,17 @@
1111
},
1212
"repository": {
1313
"type": "git",
14-
"url": "https://github.com/web3-geek/tronwallet-adapter"
14+
"url": "https://github.com/tronweb3/tronwallet-adapter"
1515
},
16-
"author": "web3-geek",
16+
"author": "tronweb3",
1717
"license": "MIT",
18+
"files": [
19+
"./packages/*/*/lib/**",
20+
"./packages/*/*/src/**",
21+
"./packages/*/*/LICENSE",
22+
"./packages/*/*/README.md",
23+
"./packages/*/*/package.json"
24+
],
1825
"scripts": {
1926
"nuke": "shx rm -rf packages/*/*/node_modules demos/**/node_modules node_modules || true",
2027
"reinstall": "pnpm run nuke && pnpm install",
@@ -133,14 +140,19 @@
133140
"express@<4.20.0": ">=4.20.0",
134141
"path-to-regexp@6.2.2": ">=6.3.0",
135142
"path-to-regexp@>=2.0.0 <3.3.0": ">=3.3.0",
136-
"path-to-regexp@<0.1.10": ">=0.1.10",
143+
"path-to-regexp@<0.1.12": ">=0.1.12",
137144
"next@>=14.0.0 <14.2.10": ">=14.2.10",
138145
"vite@>=5.3.0 <=5.3.5": ">=5.3.6",
139146
"rollup@<2.79.2": ">=2.79.2",
140147
"rollup@>=4.0.0 <4.22.4": ">=4.22.4",
141148
"path-to-regexp@>=4.0.0 <6.3.0": ">=6.3.0",
142149
"cookie@<0.7.0": ">=0.7.0",
143-
"http-proxy-middleware@<2.0.7": ">=2.0.7"
150+
"http-proxy-middleware@<2.0.7": ">=2.0.7",
151+
"cross-spawn@<6.0.6": ">=6.0.6",
152+
"cross-spawn@>=7.0.0 <7.0.5": ">=7.0.5",
153+
"next@>=9.5.5 <14.2.15": ">=14.2.15",
154+
"elliptic@<6.6.0": ">=6.6.0",
155+
"next@>=14.0.0 <14.2.21": ">=14.2.21"
144156
}
145157
}
146158
}

packages/adapters/abstract-adapter-evm/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
The MIT License (MIT)
2-
Copyright (c) 2022-Present, web3-geek
2+
Copyright (c) 2022-Present, tronweb3
33

44
Permission is hereby granted, free of charge, to any person obtaining a copy
55
of this software and associated documentation files (the "Software"), to deal

packages/adapters/abstract-adapter-evm/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The `Adapter` class defines the common interface for all adapters of specified w
1111
#### Constructor
1212

1313
- `constructor(options)`: adapter constructor method, an optional config is valid. For detailed options type, refer to the specified adapter.
14-
- [MetaMask Adapter](https://github.com/web3-geek/tronwallet-adapter/blob/main/packages/adapters/metamask/README.md)
14+
- [MetaMask Adapter](https://github.com/tronweb3/tronwallet-adapter/blob/main/packages/adapters/metamask/README.md)
1515

1616
#### Properties
1717

packages/adapters/abstract-adapter-evm/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
"name": "@tronweb3/abstract-adapter-evm",
33
"version": "1.0.2",
44
"description": "Abstract interface definition of Evm Wallet Adapters.",
5-
"author": "web3-geek",
5+
"author": "tronweb3",
66
"repository": {
77
"type": "git",
8-
"url": "https://github.com/web3-geek/tronwallet-adapter"
8+
"url": "https://github.com/tronweb3/tronwallet-adapter"
99
},
1010
"license": "MIT",
1111
"type": "module",

packages/adapters/abstract-adapter/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
The MIT License (MIT)
2-
Copyright (c) 2022-Present, web3-geek
2+
Copyright (c) 2022-Present, tronweb3
33

44
Permission is hereby granted, free of charge, to any person obtaining a copy
55
of this software and associated documentation files (the "Software"), to deal
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# `@tronweb3/tronwallet-abstract-adapter`
22

3-
This is the abstract interface definition of Tron Wallet Adapters. All wallet adapters implement abstract interface to provide unified interface. Please refer to the introduction [here](https://github.com/web3-geek/tronwallet-adapter/blob/main/packages/adapters/adapters/README.md) for detailed properties and methods.
3+
This is the abstract interface definition of Tron Wallet Adapters. All wallet adapters implement abstract interface to provide unified interface. Please refer to the introduction [here](https://github.com/tronweb3/tronwallet-adapter/blob/main/packages/adapters/adapters/README.md) for detailed properties and methods.

packages/adapters/abstract-adapter/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
"name": "@tronweb3/tronwallet-abstract-adapter",
33
"version": "1.1.8",
44
"description": "Abstract interface definition of Tron Wallet Adapters.",
5-
"author": "web3-geek",
5+
"author": "tronweb3",
66
"repository": {
77
"type": "git",
8-
"url": "https://github.com/web3-geek/tronwallet-adapter"
8+
"url": "https://github.com/tronweb3/tronwallet-adapter"
99
},
1010
"license": "MIT",
1111
"type": "module",

packages/adapters/adapters/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
The MIT License (MIT)
2-
Copyright (c) 2022-Present, web3-geek
2+
Copyright (c) 2022-Present, tronweb3
33

44
Permission is hereby granted, free of charge, to any person obtaining a copy
55
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)