From 9ad140bdce044158bafb07a6698aeb8fa94b0ee1 Mon Sep 17 00:00:00 2001 From: Oren Date: Sun, 25 Aug 2024 10:47:12 +0300 Subject: [PATCH] unstake cli fee grant fix --- x/pairing/client/cli/tx_unstake_provider.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/x/pairing/client/cli/tx_unstake_provider.go b/x/pairing/client/cli/tx_unstake_provider.go index b00ed981d8..d4dc4158d3 100644 --- a/x/pairing/client/cli/tx_unstake_provider.go +++ b/x/pairing/client/cli/tx_unstake_provider.go @@ -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 + } return nil, utils.LavaFormatError("failed querying feegrant for gas fees for granter", err, utils.LogAttr("granter", vault), )