implement Email as username
This commit is contained in:
@@ -17,11 +17,11 @@ type UserSignSession struct {
|
||||
SetIdxInterface IdxInterface
|
||||
ConfirmIdxInterface IdxInterface
|
||||
SetKeySelection KeySelection
|
||||
Username Username
|
||||
UserEmail Email
|
||||
Expire int
|
||||
}
|
||||
|
||||
func NewSignupSession(username Username, kp KeypadDimension, customerId CustomerId, svgInterface SvgIdInterface) (*UserSignSession, error) {
|
||||
func NewSignupSession(userEmail Email, kp KeypadDimension, customerId CustomerId, svgInterface SvgIdInterface) (*UserSignSession, error) {
|
||||
loginInterface, err := NewUserInterface(&kp, svgInterface)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -37,7 +37,7 @@ func NewSignupSession(username Username, kp KeypadDimension, customerId Customer
|
||||
SetIdxInterface: signupInterface.IdxInterface,
|
||||
ConfirmIdxInterface: nil,
|
||||
SetKeySelection: nil,
|
||||
Username: username,
|
||||
UserEmail: userEmail,
|
||||
Kp: kp,
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ func (s *UserSignSession) DeducePasscode(confirmKeyEntry KeySelection) ([]int, e
|
||||
return nil, errors.New("signup session set key entry is nil")
|
||||
}
|
||||
|
||||
if s.Username == "" {
|
||||
if s.UserEmail == "" {
|
||||
return nil, errors.New("signup session username is nil")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user