2022-01-18 16:31:34 +00:00
|
|
|
package requests
|
|
|
|
|
|
|
|
import (
|
|
|
|
"errors"
|
|
|
|
|
|
|
|
"github.com/status-im/status-go/eth-node/types"
|
|
|
|
)
|
|
|
|
|
|
|
|
var ErrRetractContactRequestInvalidContactID = errors.New("retract-contact-request: invalid id")
|
|
|
|
|
|
|
|
type RetractContactRequest struct {
|
2023-02-21 18:08:11 +00:00
|
|
|
ID types.HexBytes `json:"id"`
|
2022-01-18 16:31:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (a *RetractContactRequest) Validate() error {
|
2023-02-21 18:08:11 +00:00
|
|
|
if len(a.ID) == 0 {
|
2022-01-18 16:31:34 +00:00
|
|
|
return ErrRetractContactRequestInvalidContactID
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|