Skip to content

Commit

Permalink
Adjust test.
Browse files Browse the repository at this point in the history
  • Loading branch information
andreibancioiu committed May 30, 2024
1 parent aac5478 commit 1e8992a
Showing 1 changed file with 30 additions and 24 deletions.
54 changes: 30 additions & 24 deletions abi/serializer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -551,30 +551,36 @@ func TestSerializer_InRealWorldScenarios(t *testing.T) {
},
}

action := EnumValue{
Fields: []Field{
{
Name: "to",
Value: &actionTo,
},
{
Name: "egld_amount",
Value: &actionEgldAmount,
},
{
Name: "opt_gas_limit",
Value: &OptionValue{
Value: &actionGasLimit,
},
},
{
Name: "endpoint_name",
Value: &actionEndpointName,
},
{
Name: "arguments",
Value: &actionArguments,
},
action := &EnumValue{
FieldsProvider: func(discriminant uint8) []Field {
if discriminant == 5 {
return []Field{
{
Name: "to",
Value: actionTo,
},
{
Name: "egld_amount",
Value: actionEgldAmount,
},
{
Name: "opt_gas_limit",
Value: &OptionValue{
Value: actionGasLimit,
},
},
{
Name: "endpoint_name",
Value: actionEndpointName,
},
{
Name: "arguments",
Value: actionArguments,
},
}
}

return nil
},
}

Expand Down

0 comments on commit 1e8992a

Please sign in to comment.