Skip to content

Commit

Permalink
exclude IBC and pool denoms from commission
Browse files Browse the repository at this point in the history
  • Loading branch information
mircea-c committed Feb 7, 2024
1 parent 2ad0035 commit 6f77332
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions client/cosmos/querier/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,13 @@ func LoadDistributionData(account *model.Account, client *http.Client) error {
for i := range commissions.Commissions.Commission {
commission := commissions.Commissions.Commission[i]
metadata := GetDenomMetadata(commission.Denom, *account, client)

// Skip liquidity pools and IBC tokens
if strings.HasPrefix(strings.ToUpper(commission.Denom), "GAMM/POOL/") ||
strings.HasPrefix(strings.ToUpper(commission.Denom), "IBC/") {
continue
}

amount, err3 := strconv.ParseFloat(commission.Amount, 1)
if err3 != nil {
return errors.New(fmt.Sprintf("error converting commission amount: %s", err3))
Expand Down

0 comments on commit 6f77332

Please sign in to comment.