Unverified Commit 0b5eadd8 authored by Matt, Park's avatar Matt, Park Committed by GitHub
Browse files

Add error catch to gauge (#817)

parent e97b00a6
Showing with 3 additions and 0 deletions
+3 -0
......@@ -84,12 +84,15 @@ func (k Keeper) SetGaugeWithRefKey(ctx sdk.Context, gauge *types.Gauge) error {
if gauge.IsUpcomingGauge(curTime) {
combinedKeys := combineKeys(types.KeyPrefixUpcomingGauges, timeKey)
err = k.CreateGaugeRefKeys(ctx, gauge, combinedKeys, activeOrUpcomingGauge)
return err
} else if gauge.IsActiveGauge(curTime) {
combinedKeys := combineKeys(types.KeyPrefixActiveGauges, timeKey)
err = k.CreateGaugeRefKeys(ctx, gauge, combinedKeys, activeOrUpcomingGauge)
return err
} else {
combinedKeys := combineKeys(types.KeyPrefixFinishedGauges, timeKey)
err = k.CreateGaugeRefKeys(ctx, gauge, combinedKeys, activeOrUpcomingGauge)
return err
}
return nil
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment