Skip to content

Commit

Permalink
Removed testing scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
johngrantuk committed Nov 3, 2020
1 parent 1545192 commit 4016e2c
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 382 deletions.
3 changes: 3 additions & 0 deletions dist/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,9 @@ function getReturnAmountSwap(pools, poolPairData, swapType, amount) {
} else {
if (balanceOut.isEqualTo(bmath_1.bnum(0))) {
return bmath_1.bnum(0);
} else if (amount.times(3).gte(balanceOut)) {
// The maximum amoutOut you can have is 1/3 of the balanceOut to ensure binomial approximation diverges
return bmath_1.bnum(0);
} else {
returnAmount = bmath_1.calcInGivenOut(
balanceIn,
Expand Down
67 changes: 0 additions & 67 deletions test/testScripts/calculate.ts

This file was deleted.

205 changes: 0 additions & 205 deletions test/testScripts/example-simpleSwapWethDai.ts

This file was deleted.

110 changes: 0 additions & 110 deletions test/testScripts/example-swapExactOutWethDai.ts

This file was deleted.

0 comments on commit 4016e2c

Please sign in to comment.