Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: burn tax split bug #113

Merged
merged 10 commits into from
Feb 13, 2023
Prev Previous commit
Next Next commit
chore: variable naming convention
inon-man committed Feb 13, 2023
commit d8e7b2fc3996ab98cad8e9c8c6d039d8ffe713e6
6 changes: 3 additions & 3 deletions custom/auth/ante/burntax.go
Original file line number Diff line number Diff line change
@@ -41,13 +41,13 @@ func (btfd BurnTaxFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate

// Record tax proceeds
if !taxes.IsZero() {
splitTaxRate := btfd.treasuryKeeper.GetBurnSplitRate(ctx)
burnSplitRate := btfd.treasuryKeeper.GetBurnSplitRate(ctx)

if splitTaxRate.IsPositive() {
if burnSplitRate.IsPositive() {
communityDeltaCoins := sdk.NewCoins()

for i, taxCoin := range taxes {
splitcoinAmount := splitTaxRate.MulInt(taxCoin.Amount).RoundInt()
splitcoinAmount := burnSplitRate.MulInt(taxCoin.Amount).RoundInt()
splitCoin := sdk.NewCoin(taxCoin.Denom, splitcoinAmount)
taxes[i] = taxCoin.Sub(splitCoin)