@drift-labs/jit-proxy 0.17.81 → 0.17.83

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.
@@ -37,7 +37,7 @@ export declare function validatePriceType(priceType: PriceType): typeof PriceTyp
37
37
  /**
38
38
  * Validates the PostOnlyParams and returns the corresponding enum value. (required for type checking because of how anchor handles recursive types in IDL)
39
39
  */
40
- export declare function validatePostOnlyParams(postOnly: PostOnlyParams): typeof PostOnlyParams.NONE | typeof PostOnlyParams.MUST_POST_ONLY | typeof PostOnlyParams.TRY_POST_ONLY | typeof PostOnlyParams.SLIDE;
40
+ export declare function validatePostOnlyParams(postOnly: PostOnlyParams | null): typeof PostOnlyParams.NONE | typeof PostOnlyParams.MUST_POST_ONLY | typeof PostOnlyParams.TRY_POST_ONLY | typeof PostOnlyParams.SLIDE;
41
41
  /**
42
42
  * Validates the market type and returns the corresponding enum value. (required for type checking because of how anchor handles recursive types in IDL)
43
43
  */
@@ -30,6 +30,9 @@ function validatePriceType(priceType) {
30
30
  * Validates the PostOnlyParams and returns the corresponding enum value. (required for type checking because of how anchor handles recursive types in IDL)
31
31
  */
32
32
  function validatePostOnlyParams(postOnly) {
33
+ if (postOnly === null) {
34
+ return sdk_1.PostOnlyParams.NONE;
35
+ }
33
36
  if ((0, sdk_1.isVariant)(postOnly, 'none')) {
34
37
  return sdk_1.PostOnlyParams.NONE;
35
38
  }
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@drift-labs/jit-proxy",
3
- "version": "0.17.81",
3
+ "version": "0.17.83",
4
4
  "scripts": {
5
5
  "clean": "rm -rf lib",
6
6
  "build": "yarn clean && tsc"
7
7
  },
8
8
  "dependencies": {
9
9
  "@coral-xyz/anchor": "0.29.0",
10
- "@drift-labs/sdk": "2.126.0-beta.10",
10
+ "@drift-labs/sdk": "2.126.0-beta.11",
11
11
  "@solana/web3.js": "1.91.7",
12
12
  "tweetnacl-util": "^0.15.1"
13
13
  },
@@ -71,12 +71,15 @@ export function validatePriceType(
71
71
  * Validates the PostOnlyParams and returns the corresponding enum value. (required for type checking because of how anchor handles recursive types in IDL)
72
72
  */
73
73
  export function validatePostOnlyParams(
74
- postOnly: PostOnlyParams
74
+ postOnly: PostOnlyParams | null
75
75
  ):
76
76
  | typeof PostOnlyParams.NONE
77
77
  | typeof PostOnlyParams.MUST_POST_ONLY
78
78
  | typeof PostOnlyParams.TRY_POST_ONLY
79
79
  | typeof PostOnlyParams.SLIDE {
80
+ if (postOnly === null) {
81
+ return PostOnlyParams.NONE;
82
+ }
80
83
  if (isVariant(postOnly, 'none')) {
81
84
  return PostOnlyParams.NONE;
82
85
  }