-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
If we detect a binary extension in the ABI, we need to mark those fields as optional.
{
"name": "unlinkauth",
"base": "",
"fields": [
{
"name": "account",
"type": "name"
},
{
"name": "code",
"type": "name"
},
{
"name": "type",
"type": "name"
},
{
"name": "authorized_by",
"type": "name$"
}
]
}
The authorized_by field at the bottom has a $ at the end of its type, indicating its a binary extension, and these fields from my understanding are always optional. Currently our code generation isn't accounting for this, and is outputting:
@Struct.type('unlinkauth')
export class Unlinkauth extends Struct {
@Struct.field(Name)
account!: Name
@Struct.field(Name)
code!: Name
@Struct.field(Name)
type!: Name
@Struct.field(Name)
authorized_by!: Name
}and
export interface Unlinkauth {
account: NameType
code: NameType
type: NameType
authorized_by: NameType
}The authorized_by fields in both of these should be marked as optional.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done