@triadxyz/triad-protocol 2.6.1-beta → 2.6.2-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +2 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -821,9 +821,9 @@ class TriadProtocolClient {
821
821
  if (feeBps > 0) {
822
822
  const priceSpread = new bn_js_1.default(1000000).sub(orderPrice);
823
823
  const fee = priceSpread
824
+ .mul(orderPrice)
824
825
  .mul(new bn_js_1.default(feeBps))
825
826
  .div(new bn_js_1.default(10000))
826
- .mul(orderPrice)
827
827
  .div(new bn_js_1.default(1000000));
828
828
  adjustedPrice = orderPrice.add(fee);
829
829
  }
@@ -831,7 +831,7 @@ class TriadProtocolClient {
831
831
  .mul(new bn_js_1.default(Math.pow(10, this.decimals)))
832
832
  .div(adjustedPrice);
833
833
  const sharesToBuy = bn_js_1.default.min(maxSharesForPrice, availableShares);
834
- if (sharesToBuy.lt(new bn_js_1.default(0)))
834
+ if (sharesToBuy.lte(new bn_js_1.default(0)))
835
835
  continue;
836
836
  const usdcAmount = sharesToBuy
837
837
  .mul(adjustedPrice)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@triadxyz/triad-protocol",
3
- "version": "2.6.1-beta",
3
+ "version": "2.6.2-beta",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",