Fix c-like enums type encoding (#2703)
* Fix c-like enums type encoding * Update packages/api-contract/src/ContractRegistry.ts * Update packages/types/src/codec/utils/encodeTypes.ts
This commit is contained in:
@@ -169,7 +169,7 @@
|
||||
"type": "Null"
|
||||
}
|
||||
],
|
||||
"type": "[\"NameAlreadyExists\", \"CallerIsNotOwner\"]"
|
||||
"type": "{ _enum: [\"NameAlreadyExists\", \"CallerIsNotOwner\"] }"
|
||||
}
|
||||
],
|
||||
"info": 7,
|
||||
@@ -203,7 +203,7 @@
|
||||
"type": "Null"
|
||||
}
|
||||
],
|
||||
"type": "[\"NameAlreadyExists\", \"CallerIsNotOwner\"]"
|
||||
"type": "{ _enum: [\"NameAlreadyExists\", \"CallerIsNotOwner\"] }"
|
||||
}
|
||||
],
|
||||
"type": "Result<(), Error>"
|
||||
@@ -235,7 +235,7 @@
|
||||
"type": "Null"
|
||||
}
|
||||
],
|
||||
"type": "[\"NameAlreadyExists\", \"CallerIsNotOwner\"]"
|
||||
"type": "{ _enum: [\"NameAlreadyExists\", \"CallerIsNotOwner\"] }"
|
||||
},
|
||||
{
|
||||
"displayName": "Option",
|
||||
|
||||
@@ -404,7 +404,7 @@
|
||||
"type": "Null"
|
||||
}
|
||||
],
|
||||
"type": "[\"NotOwner\", \"NotApproved\", \"TokenExists\", \"TokenNotFound\", \"CannotInsert\", \"CannotRemove\", \"CannotFetchValue\", \"NotAllowed\"]"
|
||||
"type": "{ _enum: [\"NotOwner\", \"NotApproved\", \"TokenExists\", \"TokenNotFound\", \"CannotInsert\", \"CannotRemove\", \"CannotFetchValue\", \"NotAllowed\"] }"
|
||||
}
|
||||
],
|
||||
"info": 7,
|
||||
@@ -486,7 +486,7 @@
|
||||
"type": "Null"
|
||||
}
|
||||
],
|
||||
"type": "[\"NotOwner\", \"NotApproved\", \"TokenExists\", \"TokenNotFound\", \"CannotInsert\", \"CannotRemove\", \"CannotFetchValue\", \"NotAllowed\"]"
|
||||
"type": "{ _enum: [\"NotOwner\", \"NotApproved\", \"TokenExists\", \"TokenNotFound\", \"CannotInsert\", \"CannotRemove\", \"CannotFetchValue\", \"NotAllowed\"] }"
|
||||
}
|
||||
],
|
||||
"type": "Result<(), Error>"
|
||||
@@ -566,6 +566,6 @@
|
||||
"type": "Null"
|
||||
}
|
||||
],
|
||||
"type": "[\"NotOwner\", \"NotApproved\", \"TokenExists\", \"TokenNotFound\", \"CannotInsert\", \"CannotRemove\", \"CannotFetchValue\", \"NotAllowed\"]"
|
||||
"type": "{ _enum: [\"NotOwner\", \"NotApproved\", \"TokenExists\", \"TokenNotFound\", \"CannotInsert\", \"CannotRemove\", \"CannotFetchValue\", \"NotAllowed\"] }"
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user