Skip to content

Commit 00608d0

Browse files
authored
Merge pull request #692 from tronprotocol/release/v6.2.1
Release/v6.2.1
2 parents d9460de + 3cfb14e commit 00608d0

File tree

7 files changed

+255
-331
lines changed

7 files changed

+255
-331
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Change Log
22
=========
33

4+
__6.2.1__
5+
6+
## Changes
7+
8+
- Bump `axios` from v1.12.2 to v1.13.5
9+
- Bump `webpack` from v5.98.0 to v5.105.2
10+
411
__6.2.0__
512

613
## New Features

package-lock.json

Lines changed: 203 additions & 115 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tronweb",
3-
"version": "6.2.0",
3+
"version": "6.2.1",
44
"description": "JavaScript SDK that encapsulates the TRON HTTP API",
55
"main": "./lib/commonjs/index.js",
66
"module": "./lib/esm/index.js",
@@ -65,7 +65,7 @@
6565
},
6666
"dependencies": {
6767
"@babel/runtime": "7.26.10",
68-
"axios": "1.12.2",
68+
"axios": "1.13.5",
6969
"bignumber.js": "9.1.2",
7070
"ethereum-cryptography": "2.2.1",
7171
"ethers": "6.13.5",
@@ -129,7 +129,7 @@
129129
"source-map-support": "0.5.21",
130130
"ts-loader": "9.5.2",
131131
"typescript": "5.8.2",
132-
"webpack": "5.98.0",
132+
"webpack": "5.105.2",
133133
"webpack-cli": "6.0.1",
134134
"webpack-node-externals": "3.0.0"
135135
},

src/lib/trx.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { TronWeb } from '../tronweb.js';
22
import utils from '../utils/index.js';
33
import { keccak256, toUtf8Bytes, recoverAddress, SigningKey, Signature } from '../utils/ethersUtils.js';
44
import { ADDRESS_PREFIX } from '../utils/constants.js';
5-
import { toHex } from '../utils/address.js';
5+
import { fromHex, toHex } from '../utils/address.js';
66
import { Validator } from '../paramValidator/index.js';
77
import { txCheck } from '../utils/transaction.js';
88
import { ecRecover } from '../utils/crypto.js';
@@ -737,11 +737,11 @@ export class Trx {
737737
});
738738

739739
if (!foundKey) {
740-
throw new Error(privateKey + ' has no permission to sign');
740+
throw new Error('Address ' + fromHex(address) + ' has no permission to sign');
741741
}
742742

743743
if (signWeight.approved_list && signWeight.approved_list.indexOf(address) != -1) {
744-
throw new Error(privateKey + ' already sign transaction');
744+
throw new Error('Address ' + fromHex(address) + ' already sign transaction');
745745
}
746746

747747
// reset transaction

src/tronweb.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const DEFAULT_VERSION = '4.7.1';
2222

2323
const FEE_LIMIT = 150000000;
2424

25-
const version = '6.2.0';
25+
const version = '6.2.1';
2626

2727
function isValidOptions(options: unknown): options is TronWebOptions {
2828
return (
@@ -168,7 +168,6 @@ export class TronWeb extends EventEmitter {
168168
}
169169

170170
this.defaultPrivateKey = privateKey;
171-
this.emit('privateKeyChanged', privateKey);
172171
}
173172

174173
setAddress(address: string) {

src/utils/crypto.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ export function getBase58CheckAddress(addressBytes: number[]) {
2222
return encode58(checkSum);
2323
}
2424

25-
export function decodeBase58Address(base58Sting: string) {
26-
if (typeof base58Sting != 'string') return false;
25+
export function decodeBase58Address(base58Str: string) {
26+
if (typeof base58Str != 'string') return false;
2727

28-
if (base58Sting.length <= 4) return false;
28+
if (base58Str.length <= 4) return false;
2929

30-
let address = decode58(base58Sting);
30+
let address = decode58(base58Str);
3131

32-
if (base58Sting.length <= 4) return false;
32+
if (address.length <= 4) return false;
3333

3434
const len = address.length;
3535
const offset = len - 4;

0 commit comments

Comments
 (0)