Closed ricardocr987 closed 2 years ago
Thanks for reporting.
From a quick look it seems that the IDL incorrectly nests accounts for the mockLiquidateDex
instruction.
It's first account sourceMarket
has itself an accounts property which is currently not supported (and I'm not sure it makes no sense either).
A instruction should just have a list of accounts, each of type AccountMetadata
(not arrays or anything else).
Therefore I think that the tool that generated the IDL might not support your setup properly.
I have encountered a bug, trying to use solita for the Jupiter and Jet Protocol programs:
The bug is as follows:
When I try to display the requireds variable of the renderIxAccountKeys function of render-instructions I get this:
Looking at the Jet code (which is open source), I noticed this:
This is the context of the instruction that cause the problem on Jet, seems like they created different custom collections of accounts to reuse that definition on the same instruction (source_market, target_market):
This is the instruction causing the bug on the IDL: https://github.com/jet-lab/jet-v1/blob/master/app/public/idl/mainnet-beta/jet.json#L901 if you look inside the vector accounts of the instruction it has several vectors of accounts that do not comply with the type definition in solita, this is the case that gives problems that's why I get the Objects in the console