@drift-labs/sdk 2.10.0-beta.0 → 2.10.0-beta.1

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.
@@ -1,5 +1,4 @@
1
1
  /// <reference types="node" />
2
- /// <reference types="node" />
3
2
  import { SpotMarketAccount, PerpMarketAccount, OracleSource, StateAccount, UserAccount, UserStatsAccount } from '../types';
4
3
  import StrictEventEmitter from 'strict-event-emitter-types';
5
4
  import { EventEmitter } from 'events';
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.10.0-beta.0",
2
+ "version": "2.10.0-beta.1",
3
3
  "name": "drift",
4
4
  "instructions": [
5
5
  {
@@ -60,7 +60,7 @@ function calculateAssetWeight(balanceAmount, spotMarket, marginCategory) {
60
60
  assetWeight = (0, margin_1.calculateSizeDiscountAssetWeight)(sizeInAmmReservePrecision, new anchor_1.BN(spotMarket.imfFactor), new anchor_1.BN(spotMarket.initialAssetWeight));
61
61
  break;
62
62
  case 'Maintenance':
63
- assetWeight = (0, margin_1.calculateSizeDiscountAssetWeight)(sizeInAmmReservePrecision, new anchor_1.BN(spotMarket.imfFactor), new anchor_1.BN(spotMarket.maintenanceAssetWeight));
63
+ assetWeight = new anchor_1.BN(spotMarket.maintenanceAssetWeight);
64
64
  break;
65
65
  default:
66
66
  assetWeight = new anchor_1.BN(spotMarket.initialAssetWeight);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drift-labs/sdk",
3
- "version": "2.10.0-beta.0",
3
+ "version": "2.10.0-beta.1",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "author": "crispheaney",
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.10.0-beta.0",
2
+ "version": "2.10.0-beta.1",
3
3
  "name": "drift",
4
4
  "instructions": [
5
5
  {
@@ -109,11 +109,7 @@ export function calculateAssetWeight(
109
109
  );
110
110
  break;
111
111
  case 'Maintenance':
112
- assetWeight = calculateSizeDiscountAssetWeight(
113
- sizeInAmmReservePrecision,
114
- new BN(spotMarket.imfFactor),
115
- new BN(spotMarket.maintenanceAssetWeight)
116
- );
112
+ assetWeight = new BN(spotMarket.maintenanceAssetWeight);
117
113
  break;
118
114
  default:
119
115
  assetWeight = new BN(spotMarket.initialAssetWeight);