logdb #56
| @ -289,14 +289,6 @@ func (h *MenuHandlers) CheckAccountCreated(ctx context.Context, sym string, inpu | ||||
| 	return res, nil | ||||
| } | ||||
| 
 | ||||
| // ResetValidPin resets the flag_valid_pin flag.
 | ||||
| func (h *MenuHandlers) ResetValidPin(ctx context.Context, sym string, input []byte) (resource.Result, error) { | ||||
| 	var res resource.Result | ||||
| 	flag_valid_pin, _ := h.flagManager.GetFlag("flag_valid_pin") | ||||
| 	res.FlagReset = append(res.FlagReset, flag_valid_pin) | ||||
| 	return res, nil | ||||
| } | ||||
| 
 | ||||
| // CheckBlockedStatus:
 | ||||
| // 1. Checks whether the DATA_SELF_PIN_RESET is 1 and sets the flag_account_pin_reset
 | ||||
| // 2. resets the account blocked flag if the PIN attempts have been reset by an admin.
 | ||||
|  | ||||
| @ -3047,30 +3047,6 @@ func TestResetOthersPin(t *testing.T) { | ||||
| 	assert.NoError(t, err) | ||||
| } | ||||
| 
 | ||||
| func TestResetValidPin(t *testing.T) { | ||||
| 	ctx := context.Background() | ||||
| 
 | ||||
| 	fm, err := NewFlagManager(flagsPath) | ||||
| 	if err != nil { | ||||
| 		t.Fatal(err) | ||||
| 	} | ||||
| 	flag_valid_pin, _ := fm.GetFlag("flag_valid_pin") | ||||
| 
 | ||||
| 	expectedResult := resource.Result{ | ||||
| 		FlagReset: []uint32{flag_valid_pin}, | ||||
| 	} | ||||
| 
 | ||||
| 	h := &MenuHandlers{ | ||||
| 		flagManager: fm, | ||||
| 	} | ||||
| 
 | ||||
| 	res, err := h.ResetValidPin(ctx, "reset_valid_pin", []byte("")) | ||||
| 
 | ||||
| 	assert.NoError(t, err) | ||||
| 
 | ||||
| 	assert.Equal(t, expectedResult, res) | ||||
| } | ||||
| 
 | ||||
| func TestResetUnregisteredNumber(t *testing.T) { | ||||
| 	ctx := context.Background() | ||||
| 
 | ||||
|  | ||||
| @ -113,7 +113,6 @@ func (ls *LocalHandlerService) GetHandler(accountService remote.AccountService) | ||||
| 	ls.DbRs.AddLocalFunc("view_voucher", appHandlers.ViewVoucher) | ||||
| 	ls.DbRs.AddLocalFunc("set_voucher", appHandlers.SetVoucher) | ||||
| 	ls.DbRs.AddLocalFunc("get_voucher_details", appHandlers.GetVoucherDetails) | ||||
| 	ls.DbRs.AddLocalFunc("reset_valid_pin", appHandlers.ResetValidPin) | ||||
| 	ls.DbRs.AddLocalFunc("validate_blocked_number", appHandlers.ValidateBlockedNumber) | ||||
| 	ls.DbRs.AddLocalFunc("retrieve_blocked_number", appHandlers.RetrieveBlockedNumber) | ||||
| 	ls.DbRs.AddLocalFunc("reset_unregistered_number", appHandlers.ResetUnregisteredNumber) | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user