EIP712 TODO
This commit is contained in:
@@ -46,12 +46,18 @@ type User struct {
|
||||
DeletedAt *time.Time
|
||||
}
|
||||
|
||||
// TODO: move to another file?
|
||||
type Challenge struct {
|
||||
Message uuid.UUID
|
||||
TimeStamp time.Time
|
||||
ExpiresAt time.Time
|
||||
}
|
||||
|
||||
// TODO: check EIP712 in here for challenge validation
|
||||
func (c *Challenge) IsExpired() bool {
|
||||
return time.Now().After(c.ExpiresAt)
|
||||
}
|
||||
|
||||
func NewUser(pubKey, name, lastName, phoneNumber, email, nationalID string) (*User, error) {
|
||||
|
||||
_, err := phone.IsValid(phoneNumber)
|
||||
|
||||
Reference in New Issue
Block a user