Skip to content

Commit

Permalink
set flags
Browse files Browse the repository at this point in the history
  • Loading branch information
lumtis committed Apr 26, 2024
1 parent eda91f6 commit 0839f05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x/crosschain/keeper/grpc_query_cctx_rate_limit.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (k Keeper) ListPendingCctxWithinRateLimit(c context.Context, req *types.Que
foreignCoinMap = k.fungibleKeeper.GetAllForeignCoinMap(ctx)

// convert the rate limit from aZETA to ZETA
blockLimitInZeta = sdk.NewDecFromBigInt(rateLimitFlags.Rate.BigInt()).Quo(sdk.NewDec(10).Power(18))
blockLimitInZeta = sdk.NewDecFromBigInt(rateLimitFlags.Rate.BigInt())
windowLimitInZeta = blockLimitInZeta.Mul(sdk.NewDec(rateLimitFlags.Window))
}

Expand Down Expand Up @@ -232,7 +232,7 @@ func (k Keeper) ListPendingCctxWithinRateLimit(c context.Context, req *types.Que
CrossChainTx: cctxs,
TotalPending: totalPending,
CurrentWithdrawWindow: withdrawWindow,
CurrentWithdrawRate: totalWithdrawInZeta.Mul(sdk.NewDec(10).Power(18)).Quo(sdk.NewDec(withdrawWindow)).String(),
CurrentWithdrawRate: totalWithdrawInZeta.Quo(sdk.NewDec(withdrawWindow)).String(),
RateLimitExceeded: limitExceeded,
}, nil
}
Expand Down

0 comments on commit 0839f05

Please sign in to comment.