Skip to content

Commit

Permalink
refactor: naming convention
Browse files Browse the repository at this point in the history
  • Loading branch information
swarmHaseeb committed Dec 16, 2022
1 parent 01aa48b commit e7e54e5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/api/staking.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (s *Service) withdrawAllStakeHandler(w http.ResponseWriter, r *http.Request
jsonhttp.BadRequest(w, "insufficient stake to withdraw")
return
}
logger.Debug("delete stake failed", "error", err)
logger.Debug("withdraw stake failed", "error", err)
logger.Error(nil, "withdraw stake failed")
jsonhttp.InternalServerError(w, "cannot withdraw stake")
return
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/staking_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ func TestWithdrawAllStake(t *testing.T) {
)
ts, _, _, _ := newTestServer(t, testServerOptions{DebugAPI: true, StakingContract: contract})
jsonhttptest.Request(t, ts, http.MethodDelete, "/stake", http.StatusInternalServerError)
jsonhttptest.WithExpectedJSONResponse(&jsonhttp.StatusResponse{Code: http.StatusInternalServerError, Message: "cannot delete stake"})
jsonhttptest.WithExpectedJSONResponse(&jsonhttp.StatusResponse{Code: http.StatusInternalServerError, Message: "cannot withdraw stake"})
})

t.Run("gas limit header", func(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/storageincentives/staking/contract_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ func TestGetStake(t *testing.T) {
})
}

func TestDeleteStake(t *testing.T) {
func TestWithdrawStake(t *testing.T) {
t.Parallel()

ctx := context.Background()
Expand Down

0 comments on commit e7e54e5

Please sign in to comment.