Skip to content

Commit

Permalink
Fix variant extends typo
Browse files Browse the repository at this point in the history
  • Loading branch information
apporc committed Dec 9, 2023
1 parent 0d956bf commit a02c113
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/commands/contract/structs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export function generateVariant(variant, abi: any, isExport = false): ts.ClassDe
[
ts.factory.createHeritageClause(ts.SyntaxKind.ExtendsKeyword, [
ts.factory.createExpressionWithTypeArguments(
ts.factory.createIdentifier('Struct'),
ts.factory.createIdentifier('Variant'),
[]
),
]),
Expand Down
2 changes: 1 addition & 1 deletion test/data/contracts/mock-atomicassets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ export namespace Types {
'string[]',
]
)
export class variant_int8_int16_int32_int64_uint8_uint16_uint32_uint64_float32_float64_string_INT8_VEC_INT16_VEC_INT32_VEC_INT64_VEC_UINT8_VEC_UINT16_VEC_UINT32_VEC_UINT64_VEC_FLOAT_VEC_DOUBLE_VEC_STRING_VEC extends Struct {
export class variant_int8_int16_int32_int64_uint8_uint16_uint32_uint64_float32_float64_string_INT8_VEC_INT16_VEC_INT32_VEC_INT64_VEC_UINT8_VEC_UINT16_VEC_UINT32_VEC_UINT64_VEC_FLOAT_VEC_DOUBLE_VEC_STRING_VEC extends Variant {
value!:
| Int8
| Int16
Expand Down
2 changes: 1 addition & 1 deletion test/data/contracts/mock-boid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ export namespace Types {
{type: Float64, array: true},
'string[]',
])
export class AtomicValue extends Struct {
export class AtomicValue extends Variant {
value!:
| Int8
| Int16
Expand Down
2 changes: 1 addition & 1 deletion test/data/contracts/mock-eosio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ export namespace Types {
keys!: key_weight[]
}
@Variant.type('variant_block_signing_authority_v0', [block_signing_authority_v0])
export class variant_block_signing_authority_v0 extends Struct {
export class variant_block_signing_authority_v0 extends Variant {
value!: block_signing_authority_v0
}
@Struct.type('abi_hash')
Expand Down

0 comments on commit a02c113

Please sign in to comment.