good morning!!!!

Skip to content
Snippets Groups Projects
Commit e7cd627d authored by croath's avatar croath
Browse files

accounts/abi: fix for one output interface crashing

parent f7ca03ae
Branches
Tags
No related merge requests found
......@@ -169,6 +169,16 @@ func (arguments Arguments) unpackAtomic(v interface{}, output []byte) error {
if err != nil {
return err
}
// if we reach this part, there is only one output member from the contract event.
// for mobile, the result type is always a slice.
if reflect.Slice == value.Kind() && value.Len() >= 1 {
//check if it's not a byte slice
if reflect.TypeOf([]byte{}) != value.Type() {
value = value.Index(0).Elem()
}
}
return set(value, reflect.ValueOf(marshalledValue), arg)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment