Skip to content

Commit

Permalink
Fix time conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
jkrvivian committed Feb 7, 2023
1 parent 2638077 commit fd29fb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/webapi/data/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func broadcastData(c echo.Context) error {

maxAwaitTime := maxIssuedAwaitTime
if request.MaxEstimate > 0 {
maxAwaitTime = time.Duration(time.Duration(request.MaxEstimate).Milliseconds())
maxAwaitTime = time.Duration(request.MaxEstimate) * time.Millisecond
if deps.BlockIssuer.Estimate().Milliseconds() > request.MaxEstimate {
return c.JSON(http.StatusBadRequest, jsonmodels.DataResponse{
Error: fmt.Sprintf("issuance estimate greater than %d ms", request.MaxEstimate),
Expand Down

0 comments on commit fd29fb6

Please sign in to comment.