Skip to content

Commit

Permalink
update axios to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
unicornonea committed Nov 10, 2021
1 parent 1e872da commit 8d57f40
Show file tree
Hide file tree
Showing 6 changed files with 1,894 additions and 1,827 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@ In order to contribute you can

## Recent History

__4.0.1__
- set _isConstant as true for call method
- ignore max feeLimit check
- update axios to the latest version 0.24.0
- change git repository url

__4.0.0__
- support `broadcastHex` method
- ignore fullnode version check when calling `createToken` method
Expand Down
3,678 changes: 1,868 additions & 1,810 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"dependencies": {
"@babel/runtime": "^7.0.0",
"axios": "^0.21.2",
"axios": "^0.24.0",
"bignumber.js": "^9.0.1",
"elliptic": "^6.5.4",
"ethers": "^5.4.4",
Expand Down
3 changes: 1 addition & 2 deletions src/lib/sidechain.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,7 @@ export default class SideChain {
name: 'feeLimit',
type: 'integer',
value: feeLimit,
gte: 0,
lte: MAX_FEE_LIMIT
gte: 0
},
{
name: 'tokenId',
Expand Down
20 changes: 12 additions & 8 deletions test/lib/sidechain.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ describe("TronWeb.sidechain", function () {
});

it('should throw if an invalid fee limit is passed', async function () {
const feeLimit = 10000000000
const feeLimit = -1
await assertThrow(
tronWeb.sidechain.depositTrc10(TOKEN_ID, 100, DEPOSIT_FEE, feeLimit),
'Invalid feeLimit provided'
Expand Down Expand Up @@ -187,7 +187,7 @@ describe("TronWeb.sidechain", function () {

it('should throw if an invalid fee limit is passed', async function () {
const num = 100;
const feeLimit = 100000000000;
const feeLimit = -1;
await assertThrow(
tronWeb.sidechain.depositTrc20(num, DEPOSIT_FEE, feeLimit, CONTRACT_ADDRESS20),
'Invalid feeLimit provided'
Expand Down Expand Up @@ -292,7 +292,7 @@ describe("TronWeb.sidechain", function () {
});

it('should throw if an invalid fee limit is passed', async function () {
const feeLimit = 100000000000;
const feeLimit = -1;
await assertThrow(
tronWeb.sidechain.mappingTrc20(HASH20, MAPPING_FEE, feeLimit),
'Invalid feeLimit provided'
Expand Down Expand Up @@ -438,7 +438,7 @@ describe("TronWeb.sidechain", function () {
});

it('should throw if an invalid fee limit is passed', async function () {
const feeLimit = 100000000000;
const feeLimit = -1;
await assertThrow(
tronWeb.sidechain.withdrawTrc10(TOKEN_ID, 100, WITHDRAW_FEE, feeLimit),
'Invalid feeLimit provided'
Expand Down Expand Up @@ -498,10 +498,14 @@ describe("TronWeb.sidechain", function () {

it('should throw if an invalid fee limit is passed', async function () {
const feeLimit = 100000000000;
await assertThrow(
tronWeb.sidechain.withdrawTrc20(100, WITHDRAW_FEE, feeLimit, ADDRESS20_MAPPING),
'Invalid feeLimit provided'
);
const num = 10;
const options = { permissionId: 0 };
const txID = await tronWeb.sidechain.withdrawTrc20(num, WITHDRAW_FEE, FEE_LIMIT, ADDRESS20_MAPPING, options, PRIVATE_KEY);
assert.equal(txID.length, 64);
// await assertThrow(
// tronWeb.sidechain.withdrawTrc20(100, WITHDRAW_FEE, feeLimit, ADDRESS20_MAPPING),
// 'Invalid feeLimit provided'
// );
});

it('should throw if an invalid contract address is passed', async function () {
Expand Down
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1653,12 +1653,12 @@ atob@^2.1.2:
resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==

axios@^0.21.2:
version "0.21.4"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575"
integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==
axios@^0.24.0:
version "0.24.0"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.24.0.tgz#804e6fa1e4b9c5288501dd9dff56a7a0940d20d6"
integrity sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==
dependencies:
follow-redirects "^1.14.0"
follow-redirects "^1.14.4"

babel-code-frame@^6.26.0:
version "6.26.0"
Expand Down Expand Up @@ -3072,7 +3072,7 @@ flush-write-stream@^1.0.0:
inherits "^2.0.3"
readable-stream "^2.3.6"

follow-redirects@^1.0.0, follow-redirects@^1.14.0:
follow-redirects@^1.0.0, follow-redirects@^1.14.4:
version "1.14.5"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.5.tgz#f09a5848981d3c772b5392309778523f8d85c381"
integrity sha512-wtphSXy7d4/OR+MvIFbCVBDzZ5520qV8XfPklSN5QtxuMUJZ+b0Wnst1e1lCDocfzuCkHqj8k0FpZqO+UIaKNA==
Expand Down

0 comments on commit 8d57f40

Please sign in to comment.