Closed thlorenz closed 2 years ago
Looking at this closer I realize that the problem is actually the way that shank generates the IDL for data enums. As indicated in this issue the IDL for such enums generated by anchor does include the name of each data field:
{
"name": "CollectionInfo",
"type": {
"kind": "enum",
"variants": [
{
"name": "V1",
"fields": [
{
"name": "symbol",
"type": "string"
},
{
"name": "verified_creators",
"type": {
"vec": "publicKey"
}
},
{
"name": "whitelist_root",
"type": {
"array": [
"u8",
32
]
}
}
]
},
{
"name": "V2",
"fields": [
{
"name": "collection_mint",
"type": "publicKey"
}
]
}
]
}
}
As seen above though, shank does not include those names which is why solita fails to render TS for this case.
Fixed in #27
Currently solita fails to render the below:
The generated IDL for this type is the below:
I reproduced this error locally to verify that it is related to mapping the
CollectionDetails
data enum: