chore: cleanup command/crypto (#5883)

* chore: cleanup command/crypto

* cleanup unused function mockEmailCode
This commit is contained in:
Tim Möhlmann
2023-07-10 11:07:10 +03:00
committed by GitHub
parent 40a073fd33
commit 112f672266
13 changed files with 70 additions and 162 deletions

View File

@@ -258,7 +258,7 @@ func (c *Commands) addHumanCommandEmail(ctx context.Context, filter preparation.
// email not verified or
// user not registered and password set
if allowInitMail && human.shouldAddInitCode() {
initCode, err := newUserInitCode(ctx, filter, codeAlg)
initCode, err := c.newUserInitCode(ctx, filter, codeAlg)
if err != nil {
return nil, err
}
@@ -292,7 +292,7 @@ func (c *Commands) addHumanCommandPhone(ctx context.Context, filter preparation.
if human.Phone.Verified {
return append(cmds, user.NewHumanPhoneVerifiedEvent(ctx, &a.Aggregate)), nil
}
phoneCode, err := newPhoneCode(ctx, filter, codeAlg)
phoneCode, err := c.newPhoneCode(ctx, filter, codeAlg)
if err != nil {
return nil, err
}