forked from TrueCloudLab/neoneo-go
Merge pull request #2739 from nspcc-dev/fix-sc-conversion
smartcontract: fix underlying PublicKey parameter value
This commit is contained in:
commit
44df4b9dbb
2 changed files with 1 additions and 3 deletions
|
@ -387,8 +387,6 @@ func NewParametersFromValues(values ...interface{}) ([]Parameter, error) {
|
|||
func ExpandParameterToEmitable(param Parameter) (interface{}, error) {
|
||||
var err error
|
||||
switch t := param.Type; t {
|
||||
case PublicKeyType:
|
||||
return param.Value.(*keys.PublicKey).Bytes(), nil
|
||||
case ArrayType:
|
||||
arr := param.Value.([]Parameter)
|
||||
res := make([]interface{}, len(arr))
|
||||
|
|
|
@ -477,7 +477,7 @@ func TestExpandParameterToEmitable(t *testing.T) {
|
|||
Expected: util.Uint256{1, 2, 3},
|
||||
},
|
||||
{
|
||||
In: Parameter{Type: PublicKeyType, Value: pk.PublicKey()},
|
||||
In: Parameter{Type: PublicKeyType, Value: pk.PublicKey().Bytes()},
|
||||
Expected: pk.PublicKey().Bytes(),
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue