Skip to content

Commit 1eae495

Browse files
committed
fix(x/bme): check CR error on query
Signed-off-by: Artur Troian <troian@users.noreply.github.com>
1 parent 7fd896f commit 1eae495

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

x/bme/keeper/grpc_query.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ func (qs Querier) Status(ctx context.Context, _ *types.QueryStatusRequest) (*typ
5656
return nil, err
5757
}
5858

59-
cr, _ := qs.GetCollateralRatio(sctx)
59+
cr, err := qs.GetCollateralRatio(sctx)
60+
if err != nil {
61+
return nil, err
62+
}
6063

6164
warnThreshold := math.LegacyNewDec(int64(params.CircuitBreakerWarnThreshold)).Quo(math.LegacyNewDec(10000))
6265
haltThreshold := math.LegacyNewDec(int64(params.CircuitBreakerHaltThreshold)).Quo(math.LegacyNewDec(10000))

0 commit comments

Comments
 (0)