Skip to content

Commit

Permalink
fix: staking path change (#3472)
Browse files Browse the repository at this point in the history
  • Loading branch information
istae committed Oct 31, 2022
1 parent dfe8d7f commit 9d2e24a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions openapi/Swarm.yaml
@@ -1,7 +1,7 @@
openapi: 3.0.3

info:
version: 3.2.0
version: 3.3.0
title: Bee API
description: "A list of the currently provided Interfaces to interact with the swarm, implementing file operations and sending messages"

Expand Down Expand Up @@ -1901,7 +1901,7 @@ paths:
default:
description: Default response

"/stake/deposit/{amount}":
"/stake/{amount}":
post:
summary: Deposit some amount for staking.
description: Be aware, this endpoint creates an on-chain transactions and transfers BZZ from the node's Ethereum account and hence directly manipulates the wallet balance.
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/router.go
Expand Up @@ -545,7 +545,7 @@ func (s *Service) mountBusinessDebug(restricted bool) {
web.FinalHandlerFunc(s.healthHandler),
))

handle("/stake/deposit/{amount}", web.ChainHandlers(
handle("/stake/{amount}", web.ChainHandlers(
s.stakingAccessHandler,
s.gasConfigMiddleware("deposit stake"),
web.FinalHandler(jsonhttp.MethodHandler{
Expand Down
4 changes: 2 additions & 2 deletions pkg/api/staking_test.go
Expand Up @@ -24,7 +24,7 @@ func TestDepositStake(t *testing.T) {

minStake := big.NewInt(100000000000000000).String()
depositStake := func(amount string) string {
return fmt.Sprintf("/stake/deposit/%s", amount)
return fmt.Sprintf("/stake/%s", amount)
}

t.Run("ok", func(t *testing.T) {
Expand Down Expand Up @@ -161,7 +161,7 @@ func Test_stakingDepositHandler_invalidInputs(t *testing.T) {
t.Run(tc.name, func(t *testing.T) {
t.Parallel()

jsonhttptest.Request(t, client, http.MethodPost, "/stake/deposit/"+tc.amount, tc.want.Code,
jsonhttptest.Request(t, client, http.MethodPost, "/stake/"+tc.amount, tc.want.Code,
jsonhttptest.WithExpectedJSONResponse(tc.want),
)
})
Expand Down

0 comments on commit 9d2e24a

Please sign in to comment.