@tatumio/tron 2.2.7 → 2.2.8
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
{
|
2
2
|
"name": "@tatumio/tron",
|
3
|
-
"version": "2.2.
|
3
|
+
"version": "2.2.8",
|
4
4
|
"type": "commonjs",
|
5
5
|
"license": "MIT",
|
6
6
|
"main": "./src/index.js",
|
7
7
|
"types": "./src/index.d.ts",
|
8
8
|
"dependencies": {
|
9
|
-
"@tatumio/shared-testing-common": "2.2.
|
10
|
-
"@tatumio/api-client": "2.2.
|
9
|
+
"@tatumio/shared-testing-common": "2.2.8",
|
10
|
+
"@tatumio/api-client": "2.2.8",
|
11
11
|
"axios": "^0.26.0",
|
12
12
|
"form-data": "^4.0.0",
|
13
|
-
"@tatumio/shared-blockchain-evm-based": "2.2.
|
14
|
-
"@tatumio/shared-abstract-sdk": "2.2.
|
13
|
+
"@tatumio/shared-blockchain-evm-based": "2.2.8",
|
14
|
+
"@tatumio/shared-abstract-sdk": "2.2.8",
|
15
15
|
"bignumber.js": "^9.0.2",
|
16
|
-
"@tatumio/shared-core": "2.2.
|
16
|
+
"@tatumio/shared-core": "2.2.8",
|
17
17
|
"lodash": "^4.17.21",
|
18
|
-
"@tatumio/shared-blockchain-abstract": "2.2.
|
18
|
+
"@tatumio/shared-blockchain-abstract": "2.2.8",
|
19
19
|
"ethereumjs-wallet": "^1.0.2",
|
20
20
|
"bip39": "^3.0.2",
|
21
21
|
"web3": "^1.7.4",
|
@@ -15,7 +15,7 @@ const prepareSignedTransaction = (body, tronWeb, provider) => tslib_1.__awaiter(
|
|
15
15
|
const from = body.signatureId
|
16
16
|
? body.from
|
17
17
|
: client.address.fromHex(client.address.fromPrivateKey(body.fromPrivateKey));
|
18
|
-
const balance = (yield contractInstance.balanceOf(from).call()).
|
18
|
+
const balance = (yield contractInstance.balanceOf(from).call()).toString();
|
19
19
|
const valueToSend = new bignumber_js_1.default(amount).multipliedBy(new bignumber_js_1.default(10).pow(decimals));
|
20
20
|
if (valueToSend.isGreaterThan(new bignumber_js_1.default(balance || 0))) {
|
21
21
|
throw new Error('Insufficient TRC20 balance');
|