openbook-dex / openbook-v2

openbook-v2 monorepo, contains solana program and ts client
Other
165 stars 96 forks source link

ConsumeEventAdmin checker #188

Closed Ozodimgba closed 1 year ago

Ozodimgba commented 1 year ago

Anchor handles Zero/Null Publickey(s) by using the system program as the "None" value. The market.consumeEventAdmin.key passed into the client doesn't handle null options properly. By passing the SystemProgram Pubkey as the events Admin, null options can only work when and if the SystemProgram signs the tx. When it doesn't sign it, the tx wont process and finally reach blockHeightExpiry. This checker helps to properly handle null options.