Conversation
| direction, | ||
| marketType ?? null, | ||
| marketIndex ?? null, | ||
| direction ?? null, |
There was a problem hiding this comment.
seems like we should consider doing a null check inside of getCancelOrdersIx and throw error if any of these are null?
There was a problem hiding this comment.
I hesitate to change the behavior like adding exception throwing if there wasn't any before. I guess the only issue here is they were T | undefined before and the function wanted T | null instead. I think in 99.99% of the time coalescing to null will not change the behavior right?
sdk/src/driftClient.ts
Outdated
| postOnly: postOnly || null, | ||
| bitFlags: bitFlags || null, | ||
| policy: policy || null, | ||
| policy: policy || undefined, |
There was a problem hiding this comment.
how come we are only doing undefined on the policy param and keeping null for the rest? is there something with how this gets converted over to rust and we will get an error there?
There was a problem hiding this comment.
just what the internal type wanted. Always tricky to know least disruptive way to fix these errors. Are you thinking instead we should change the type instead of the passed value?
There was a problem hiding this comment.
actually I think we should change the type instead...
* fix: many null checks fixed * fix: prettier * feat: get active markets helpers * fix: prettier
4591301 to
4d49913
Compare
No description provided.