Skip to content

Commit 2f1c9e3

Browse files
fix: chequebook error msg and /stake openapi (#5040)
1 parent bbc28d0 commit 2f1c9e3

File tree

2 files changed

+38
-18
lines changed

2 files changed

+38
-18
lines changed

openapi/Swarm.yaml

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ paths:
7070
$ref: "SwarmCommon.yaml#/components/schemas/ActGranteesCreateRequest"
7171
responses:
7272
"201":
73-
description: Ok
73+
description: OK
7474
content:
7575
application/json:
7676
schema:
@@ -94,7 +94,7 @@ paths:
9494
description: Grantee list reference
9595
responses:
9696
"200":
97-
description: Ok
97+
description: OK
9898
content:
9999
application/json:
100100
schema:
@@ -150,7 +150,7 @@ paths:
150150
$ref: "SwarmCommon.yaml#/components/schemas/ActGranteesPatchRequest"
151151
responses:
152152
"200":
153-
description: Ok
153+
description: OK
154154
content:
155155
application/json:
156156
schema:
@@ -205,7 +205,7 @@ paths:
205205
format: binary
206206
responses:
207207
"201":
208-
description: Ok
208+
description: OK
209209
headers:
210210
"swarm-tag":
211211
$ref: "SwarmCommon.yaml#/components/headers/SwarmTag"
@@ -318,7 +318,7 @@ paths:
318318
format: binary
319319
responses:
320320
"201":
321-
description: Ok
321+
description: OK
322322
headers:
323323
"swarm-tag":
324324
description: Tag UID if it was passed to the request `swarm-tag` header.
@@ -405,7 +405,7 @@ paths:
405405
format: binary
406406
responses:
407407
"201":
408-
description: Ok
408+
description: OK
409409
headers:
410410
"swarm-tag":
411411
$ref: "SwarmCommon.yaml#/components/headers/SwarmTag"
@@ -448,7 +448,7 @@ paths:
448448
- $ref: "SwarmCommon.yaml#/components/parameters/SwarmActHistoryAddress"
449449
responses:
450450
"200":
451-
description: Ok
451+
description: OK
452452
# "swarm-feed-index":
453453
# $ref: "SwarmCommon.yaml#/components/headers/SwarmFeedIndex"
454454
content:
@@ -511,7 +511,7 @@ paths:
511511
- $ref: "SwarmCommon.yaml#/components/parameters/SwarmChunkRetrievalTimeoutParameter"
512512
responses:
513513
"200":
514-
description: Ok
514+
description: OK
515515
content:
516516
application/octet-stream:
517517
schema:
@@ -654,7 +654,7 @@ paths:
654654
$ref: "SwarmCommon.yaml#/components/schemas/Address"
655655
responses:
656656
"200":
657-
description: Ok
657+
description: OK
658658
content:
659659
application/json:
660660
schema:
@@ -1111,7 +1111,7 @@ paths:
11111111
description: Postage batch to use for re-upload. If none is provided and the file was uploaded on the same node before, it will reuse the same batch. If not found, it will return error. If a new batch is provided, the chunks are stamped again with the new batch.
11121112
responses:
11131113
"200":
1114-
description: Ok
1114+
description: OK
11151115
"400":
11161116
$ref: "SwarmCommon.yaml#/components/responses/400"
11171117
"404":
@@ -1392,7 +1392,7 @@ paths:
13921392
required: true
13931393
responses:
13941394
"201":
1395-
description: Ok
1395+
description: OK
13961396
content:
13971397
application/json:
13981398
schema:
@@ -2296,7 +2296,11 @@ paths:
22962296
- Staking
22972297
responses:
22982298
"200":
2299-
$ref: "SwarmCommon.yaml#/components/schemas/GetWithdrawableResponse"
2299+
description: OK
2300+
content:
2301+
application/json:
2302+
schema:
2303+
$ref: "SwarmCommon.yaml#/components/schemas/GetWithdrawableResponse"
23002304
"500":
23012305
$ref: "SwarmCommon.yaml#/components/responses/500"
23022306
default:
@@ -2311,7 +2315,11 @@ paths:
23112315
- $ref: "SwarmCommon.yaml#/components/parameters/GasLimitParameter"
23122316
responses:
23132317
"200":
2314-
$ref: "SwarmCommon.yaml#/components/schemas/StakeTransactionResponse"
2318+
description: OK
2319+
content:
2320+
application/json:
2321+
schema:
2322+
$ref: "SwarmCommon.yaml#/components/schemas/StakeTransactionResponse"
23152323
"400":
23162324
$ref: "SwarmCommon.yaml#/components/responses/400"
23172325
"500":
@@ -2336,7 +2344,11 @@ paths:
23362344
- $ref: "SwarmCommon.yaml#/components/parameters/GasLimitParameter"
23372345
responses:
23382346
"200":
2339-
$ref: "SwarmCommon.yaml#/components/schemas/StakeTransactionResponse"
2347+
description: OK
2348+
content:
2349+
application/json:
2350+
schema:
2351+
$ref: "SwarmCommon.yaml#/components/schemas/StakeTransactionResponse"
23402352
"400":
23412353
$ref: "SwarmCommon.yaml#/components/responses/400"
23422354
"500":
@@ -2352,7 +2364,11 @@ paths:
23522364
- Staking
23532365
responses:
23542366
"200":
2355-
$ref: "SwarmCommon.yaml#/components/schemas/GetStakeResponse"
2367+
description: OK
2368+
content:
2369+
application/json:
2370+
schema:
2371+
$ref: "SwarmCommon.yaml#/components/schemas/GetStakeResponse"
23562372
"500":
23572373
$ref: "SwarmCommon.yaml#/components/responses/500"
23582374
default:
@@ -2367,7 +2383,11 @@ paths:
23672383
- $ref: "SwarmCommon.yaml#/components/parameters/GasLimitParameter"
23682384
responses:
23692385
"200":
2370-
$ref: "SwarmCommon.yaml#/components/schemas/StakeTransactionResponse"
2386+
description: OK
2387+
content:
2388+
application/json:
2389+
schema:
2390+
$ref: "SwarmCommon.yaml#/components/schemas/StakeTransactionResponse"
23712391
"400":
23722392
$ref: "SwarmCommon.yaml#/components/responses/400"
23732393
"500":

pkg/settlement/swap/chequebook/init.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ func checkBalance(
105105
case <-time.After(balanceCheckBackoffDuration):
106106
case <-timeoutCtx.Done():
107107
if insufficientERC20 {
108-
return fmt.Errorf("insufficient %s for initial deposit", swarmTokenName)
108+
return fmt.Errorf("insufficient %s for deploying chequebook", swarmTokenName)
109109
} else {
110-
return fmt.Errorf("insufficient %s for initial deposit", nativeTokenName)
110+
return fmt.Errorf("insufficient %s for deploying chequebook", nativeTokenName)
111111
}
112112
}
113113
continue

0 commit comments

Comments
 (0)