add UpdateAlias to the DevAccountService and mocks
This commit is contained in:
parent
49a8184d02
commit
57ee409f96
@ -806,6 +806,13 @@ func (das *DevAccountService) RequestAlias(ctx context.Context, publicKey string
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (das *DevAccountService) UpdateAlias(ctx context.Context, publicKey string, name string) (*models.RequestAliasResult, error) {
|
||||
logg.DebugCtxf(ctx, "Updated the alias", "address", publicKey, "name", name)
|
||||
return &models.RequestAliasResult{
|
||||
Alias: name,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (das *DevAccountService) SendUpsellSMS(ctx context.Context, inviterPhone, inviteePhone string) (*models.SendSMSResponse, error) {
|
||||
logg.DebugCtxf(ctx, "sent an SMS", "inviterPhone", inviterPhone, "inviteePhone", inviteePhone)
|
||||
return &models.SendSMSResponse{
|
||||
|
@ -58,6 +58,10 @@ func (m MockApi) RequestAlias(ctx context.Context, publicKey string, hint string
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (m MockApi) UpdateAlias(ctx context.Context, publicKey string, name string) (*models.RequestAliasResult, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (m MockApi) TokenTransfer(ctx context.Context, amount, from, to, tokenAddress string) (*models.TokenTransferResponse, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
@ -58,6 +58,11 @@ func (m *MockAccountService) RequestAlias(ctx context.Context, publicKey string,
|
||||
return args.Get(0).(*models.RequestAliasResult), args.Error(1)
|
||||
}
|
||||
|
||||
func (m *MockAccountService) UpdateAlias(ctx context.Context, publicKey string, name string) (*models.RequestAliasResult, error) {
|
||||
args := m.Called(publicKey, name)
|
||||
return args.Get(0).(*models.RequestAliasResult), args.Error(1)
|
||||
}
|
||||
|
||||
func (m *MockAccountService) SendUpsellSMS(ctx context.Context, inviterPhone, inviteePhone string) (*models.SendSMSResponse, error) {
|
||||
args := m.Called(inviterPhone, inviteePhone)
|
||||
return args.Get(0).(*models.SendSMSResponse), args.Error(1)
|
||||
|
@ -69,6 +69,10 @@ func (m *TestAccountService) RequestAlias(ctx context.Context, publicKey string,
|
||||
return &models.RequestAliasResult{}, nil
|
||||
}
|
||||
|
||||
func (m *TestAccountService) UpdateAlias(ctx context.Context, publicKey string, hint string) (*models.RequestAliasResult, error) {
|
||||
return &models.RequestAliasResult{}, nil
|
||||
}
|
||||
|
||||
func (m *TestAccountService) SendUpsellSMS(ctx context.Context, inviterPhone, inviteePhone string) (*models.SendSMSResponse, error) {
|
||||
return &models.SendSMSResponse{}, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user