@drift-labs/jit-proxy 0.17.82 → 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.
package/lib/jitProxyClient.d.ts
CHANGED
|
@@ -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
|
*/
|
package/lib/jitProxyClient.js
CHANGED
|
@@ -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
package/src/jitProxyClient.ts
CHANGED
|
@@ -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
|
}
|