@reflectmoney/stable.ts 2.0.6 → 2.0.8

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.
@@ -338,10 +338,10 @@ class Stablecoin {
338
338
  const { decimals } = yield (0, spl_token_1.getMint)(this.connection, collateralMint);
339
339
  const collateralAmount = new bn_js_1.default(amount)
340
340
  .mul(new bn_js_1.default(10).pow(new bn_js_1.default(decimals)))
341
+ .mul(new bn_js_1.default(10000 - slippageBips))
341
342
  .div(new bn_js_1.default(10).pow(new bn_js_1.default(6))) // stablecoin decimals
342
343
  .div(price)
343
344
  .div(new bn_js_1.default(10).pow(new bn_js_1.default(expo)))
344
- .mul(new bn_js_1.default(10000 - slippageBips))
345
345
  .div(new bn_js_1.default(10000));
346
346
  return collateralAmount;
347
347
  });
@@ -364,8 +364,10 @@ class Stablecoin {
364
364
  const stablecoinAmount = new bn_js_1.default(amount)
365
365
  .mul(price)
366
366
  .mul(new bn_js_1.default(10).pow(new bn_js_1.default(6))) // stablecoin decimals
367
+ .mul(new bn_js_1.default(10000 - slippageBips))
367
368
  .div(new bn_js_1.default(10).pow(new bn_js_1.default(expo)))
368
- .div(new bn_js_1.default(10).pow(new bn_js_1.default(decimals)));
369
+ .div(new bn_js_1.default(10).pow(new bn_js_1.default(decimals)))
370
+ .div(new bn_js_1.default(10000));
369
371
  return stablecoinAmount;
370
372
  });
371
373
  }
@@ -2,6 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LST_LOOKUP_TABLE = exports.JLP_LOOKUP_TABLE = exports.USDC_PLUS_LOOKUP_TABLE = void 0;
4
4
  const web3_js_1 = require("@solana/web3.js");
5
- exports.USDC_PLUS_LOOKUP_TABLE = new web3_js_1.PublicKey("CzJh5tMvZFGEFj4CnPd2GjqCYi5zEemMstc3YQRWEeDz");
5
+ exports.USDC_PLUS_LOOKUP_TABLE = new web3_js_1.PublicKey("5xoAnRhA1oneiniJNF7pbjyu7XLW1i7M2nS5UbBTdYUB");
6
6
  exports.JLP_LOOKUP_TABLE = new web3_js_1.PublicKey(0);
7
7
  exports.LST_LOOKUP_TABLE = new web3_js_1.PublicKey(0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reflectmoney/stable.ts",
3
- "version": "2.0.6",
3
+ "version": "2.0.8",
4
4
  "type": "commonjs",
5
5
  "author": "stablecoinjesus @ Palindrome Engineering",
6
6
  "repository": {