Skip to content

Commit

Permalink
Upgrade dependencies to their latest minor/patch version (#685)
Browse files Browse the repository at this point in the history
* Linting fixup: yarn fmt
  • Loading branch information
Shaptic authored Sep 1, 2023
1 parent 2d51d13 commit ecc9639
Show file tree
Hide file tree
Showing 6 changed files with 329 additions and 189 deletions.
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,23 +71,23 @@
"homepage": "https://github.com/stellar/js-stellar-base",
"devDependencies": {
"@babel/cli": "^7.22.10",
"@babel/core": "^7.22.10",
"@babel/eslint-parser": "^7.22.10",
"@babel/core": "^7.22.11",
"@babel/eslint-parser": "^7.22.11",
"@babel/eslint-plugin": "^7.22.10",
"@babel/preset-env": "^7.22.10",
"@babel/preset-env": "^7.22.14",
"@babel/register": "^7.21.0",
"@definitelytyped/dtslint": "^0.0.165",
"@definitelytyped/dtslint": "^0.0.175",
"@istanbuljs/nyc-config-babel": "3.0.0",
"@types/node": "^20.4.10",
"@typescript-eslint/parser": "^6.3.0",
"@types/node": "^20.5.7",
"@typescript-eslint/parser": "^6.5.0",
"babel-loader": "^9.1.3",
"babel-plugin-istanbul": "^6.1.1",
"chai": "^4.3.7",
"chai": "^4.3.8",
"cross-env": "^7.0.3",
"eslint": "^8.47.0",
"eslint": "^8.48.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prefer-import": "^0.0.1",
"eslint-plugin-prettier": "^5.0.0",
Expand All @@ -107,20 +107,20 @@
"mocha": "^10.2.0",
"node-polyfill-webpack-plugin": "^2.0.1",
"nyc": "^15.1.0",
"prettier": "^3.0.1",
"prettier": "^3.0.3",
"randombytes": "^2.1.0",
"sinon": "^15.0.3",
"sinon-chai": "^3.7.0",
"taffydb": "^2.7.3",
"terser-webpack-plugin": "^5.3.8",
"ts-node": "^10.9.1",
"typescript": "^5.0.3",
"typescript": "^5.2.2",
"webpack": "^5.82.1",
"webpack-cli": "^5.1.1"
},
"dependencies": {
"base32.js": "^0.1.0",
"bignumber.js": "^9.1.1",
"bignumber.js": "^9.1.2",
"buffer": "^6.0.3",
"js-xdr": "^3.0.0",
"sha.js": "^2.3.6",
Expand Down
4 changes: 3 additions & 1 deletion src/operations/create_account.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ export function createAccount(opts) {
throw new Error('destination is invalid');
}
if (!this.isValidAmount(opts.startingBalance, true)) {
throw new TypeError(this.constructAmountRequirementsError('startingBalance'))
throw new TypeError(
this.constructAmountRequirementsError('startingBalance')
);
}
const attributes = {};
attributes.destination = Keypair.fromPublicKey(
Expand Down
4 changes: 2 additions & 2 deletions src/operations/liquidity_pool_deposit.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ export function liquidityPoolDeposit(opts = {}) {
attributes.liquidityPoolId = xdr.PoolId.fromXDR(liquidityPoolId, 'hex');

if (!this.isValidAmount(maxAmountA, true)) {
throw new TypeError(this.constructAmountRequirementsError('maxAmountA'))
throw new TypeError(this.constructAmountRequirementsError('maxAmountA'));
}
attributes.maxAmountA = this._toXDRAmount(maxAmountA);

if (!this.isValidAmount(maxAmountB, true)) {
throw new TypeError(this.constructAmountRequirementsError('maxAmountB'))
throw new TypeError(this.constructAmountRequirementsError('maxAmountB'));
}
attributes.maxAmountB = this._toXDRAmount(maxAmountB);

Expand Down
6 changes: 3 additions & 3 deletions src/operations/liquidity_pool_withdraw.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ export function liquidityPoolWithdraw(opts = {}) {
attributes.liquidityPoolId = xdr.PoolId.fromXDR(opts.liquidityPoolId, 'hex');

if (!this.isValidAmount(opts.amount)) {
throw new TypeError(this.constructAmountRequirementsError('amount'))
throw new TypeError(this.constructAmountRequirementsError('amount'));
}
attributes.amount = this._toXDRAmount(opts.amount);

if (!this.isValidAmount(opts.minAmountA, true)) {
throw new TypeError(this.constructAmountRequirementsError('minAmountA'))
throw new TypeError(this.constructAmountRequirementsError('minAmountA'));
}
attributes.minAmountA = this._toXDRAmount(opts.minAmountA);

if (!this.isValidAmount(opts.minAmountB, true)) {
throw new TypeError(this.constructAmountRequirementsError('minAmountB'))
throw new TypeError(this.constructAmountRequirementsError('minAmountB'));
}
attributes.minAmountB = this._toXDRAmount(opts.minAmountB);

Expand Down
10 changes: 6 additions & 4 deletions test/unit/operation_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2478,8 +2478,9 @@ describe('Operation', function () {
);

opts.maxPrice = '0.55';
expect(() => StellarBase.Operation.liquidityPoolDeposit(opts)).to.not
.throw();
expect(() =>
StellarBase.Operation.liquidityPoolDeposit(opts)
).to.not.throw();
});

it('throws an error if prices are negative', function () {
Expand Down Expand Up @@ -2655,8 +2656,9 @@ describe('Operation', function () {
);

opts.minAmountB = '20000';
expect(() => StellarBase.Operation.liquidityPoolWithdraw(opts)).to.not
.throw();
expect(() =>
StellarBase.Operation.liquidityPoolWithdraw(opts)
).to.not.throw();
});

it('creates a liquidityPoolWithdraw', function () {
Expand Down
Loading

0 comments on commit ecc9639

Please sign in to comment.