blockworks-foundation / mango-v3

Mango Markets V3 Smart Contract
MIT License
152 stars 90 forks source link

implementing cancel all spot orders instruction #162

Closed godmodegalactus closed 2 years ago

godmodegalactus commented 2 years ago

implemented cancel all spot orders instruction.

microwavedcola1 commented 2 years ago

UXD team is helping fix the only failing ci step

microwavedcola1 commented 2 years ago

UXD team is helping fix the only failing ci step

we can ignore this for now

godmodegalactus commented 2 years ago

How can i merge this PR. I need all 3 approvals and all tests to be passing?

tlrjs commented 2 years ago

How can i merge this PR. I need all 3 approvals and all tests to be passing?

We just need one approval. We may be able to ignore the UXD tests, I'll let @microwavedcola1 confirm though.

godmodegalactus commented 2 years ago

I haven't reviewed in detail yet.

Overall, this function seems to be (rightly!) 90% identical to force_cancel_spot_orders. I wonder if they could share code somehow.

Most of the common code is loading of accounts and checking these accounts. I can load all the accounts and put only the checks and calls to cancel and unsettle in a function. But I am not sure If it will be more readable.

dafyddd commented 2 years ago

Can you also implement the client functions in mango-client-v3? That's usually half the work.

godmodegalactus commented 2 years ago

Can you also implement the client functions in mango-client-v3? That's usually half the work.

Yes sure,

godmodegalactus commented 2 years ago

@dafyddd @microwavedcola1 @mschneider Approve?

godmodegalactus commented 2 years ago

BTW implemented a new PR for changes in mango-client-v3. To test the changes in client i think we need mango-v3 atleast in devnet. https://github.com/blockworks-foundation/mango-client-v3/pull/79