Skip to content

Commit

Permalink
add query minimum gas prices for validator
Browse files Browse the repository at this point in the history
  • Loading branch information
ducphamle2 committed Mar 22, 2021
1 parent eb8fd0b commit f2bb5df
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions x/provider/keeper/querier.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,12 @@ func (k *Querier) QueryMinFees(goCtx context.Context, req *types.MinFeesReq) (*t

ctx := sdk.UnwrapSDKContext(goCtx)

if req.OracleScriptName == "min_gas_prices" && req.ValNum <= 0 {
return &types.MinFeesRes{
MinFees: ctx.MinGasPrices().String(),
}, nil
}

// id of the request
_, err := k.keeper.GetOracleScript(ctx, req.OracleScriptName)
if err != nil {
Expand Down

0 comments on commit f2bb5df

Please sign in to comment.