diff --git a/ioctl/cmd/ws/wsdeviceapprove.go b/ioctl/cmd/ws/wsdeviceapprove.go index d80b13fe6f..529f980e66 100644 --- a/ioctl/cmd/ws/wsdeviceapprove.go +++ b/ioctl/cmd/ws/wsdeviceapprove.go @@ -61,7 +61,7 @@ func approveProjectDevice(projectID uint64, devices string) (string, error) { deviceArr = strings.Split(devices, ",") } - deviceAddress := make([]common.Address, len(deviceArr)) + deviceAddress := make([]common.Address, 0, len(deviceArr)) for _, device := range deviceArr { addr, err := address.FromString(device) if err != nil { diff --git a/ioctl/cmd/ws/wsdeviceunapprove.go b/ioctl/cmd/ws/wsdeviceunapprove.go index 850bf98a33..a072f6d504 100644 --- a/ioctl/cmd/ws/wsdeviceunapprove.go +++ b/ioctl/cmd/ws/wsdeviceunapprove.go @@ -61,7 +61,7 @@ func unapproveProjectDevice(projectID uint64, devices string) (string, error) { deviceArr = strings.Split(devices, ",") } - deviceAddress := make([]common.Address, len(deviceArr)) + deviceAddress := make([]common.Address, 0, len(deviceArr)) for _, device := range deviceArr { addr, err := address.FromString(device) if err != nil {