accounts/abi: fix resolving single struct argument (#23573)

This commit is contained in:
gary rong
2021-09-22 16:18:18 +08:00
committed by GitHub
parent ca9bce9a45
commit 57a3fab8a7
3 changed files with 83 additions and 8 deletions

View File

@ -137,7 +137,7 @@ func (arguments Arguments) copyAtomic(v interface{}, marshalledValues interface{
dst := reflect.ValueOf(v).Elem()
src := reflect.ValueOf(marshalledValues)
if dst.Kind() == reflect.Struct && src.Kind() != reflect.Struct {
if dst.Kind() == reflect.Struct {
return set(dst.Field(0), src)
}
return set(dst, src)