Skip to content

Commit

Permalink
unstake cli fee grant fix
Browse files Browse the repository at this point in the history
  • Loading branch information
oren-lava committed Aug 25, 2024
1 parent 5937abe commit 9ad140b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions x/pairing/client/cli/tx_unstake_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ func CreateRevokeFeeGrantMsg(clientCtx client.Context, chainID string) (*feegran
feegrantQuerier := feegrant.NewQueryClient(clientCtx)
res, err := feegrantQuerier.Allowance(ctx, &feegrant.QueryAllowanceRequest{Granter: vault, Grantee: providerEntry.Address})
if err != nil {
if strings.Contains(err.Error(), "fee-grant not found") {
// fee grant not found, do nothing
return nil, nil

Check failure on line 139 in x/pairing/client/cli/tx_unstake_provider.go

View workflow job for this annotation

GitHub Actions / lint

return both the `nil` error and invalid value: use a sentinel error instead (nilnil)
}
return nil, utils.LavaFormatError("failed querying feegrant for gas fees for granter", err,
utils.LogAttr("granter", vault),
)
Expand Down

0 comments on commit 9ad140b

Please sign in to comment.