Skip to content

Commit

Permalink
Handle l2 beat error
Browse files Browse the repository at this point in the history
  • Loading branch information
aopoltorzhicky committed Jan 29, 2025
1 parent a54cacf commit f70376b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion internal/tvl/l2beat/tvl.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ func (api API) TVL(ctx context.Context, rollupName string, timeframe TvlTimefram
args := make(map[string]string)
args["range"] = timeframe.String()

err = api.get(ctx, fmt.Sprintf("scaling/tvl/%s", rollupName), args, &result)
if err = api.get(ctx, fmt.Sprintf("scaling/tvl/%s", rollupName), args, &result); err != nil {
return
}

if !result.Success {
err = errors.Errorf("l2 beat error: %s", result.Error)
}
return
}

0 comments on commit f70376b

Please sign in to comment.