Skip to content

Commit 9ac707e

Browse files
committed
chore: lint
1 parent 8693f11 commit 9ac707e

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

proto/kyve/delegation/v1beta1/tx.proto

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@ import "cosmos_proto/cosmos.proto";
88
option go_package = "github.com/KYVENetwork/chain/x/stakers/types_delegation_v1beta1";
99

1010
/*
11-
NOTICE:
12-
This file needs to be kept for backwards compatibility with the governance module.
13-
Otherwise, it is not possible to decode legacy delegation param update proposals.
11+
NOTICE:
12+
This file needs to be kept for backwards compatibility with the governance module.
13+
Otherwise, it is not possible to decode legacy delegation param update proposals.
1414
*/
1515

16-
1716
// Msg defines the Msg service.
1817
service Msg {
1918
option (cosmos.msg.v1.service) = true;

x/bundles/keeper/logic_bundles.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,12 +269,10 @@ func (k Keeper) calculatePayouts(ctx sdk.Context, poolId uint64, totalPayout sdk
269269
whitelist := k.fundersKeeper.GetCoinWhitelistMap(ctx)
270270
storageCost := k.GetStorageCost(ctx, bundleProposal.StorageProviderId).MulInt64(int64(bundleProposal.DataSize))
271271

272-
kyveCoinFound, kyveCoin := totalPayout.Find(globalTypes.Denom)
273-
274272
kyveWeight := whitelist[globalTypes.Denom].CoinWeight
275273
kyveCurrencyUnit := math.LegacyNewDec(10).Power(uint64(whitelist[globalTypes.Denom].CoinDecimals))
276274

277-
if kyveCoinFound && !kyveWeight.IsZero() {
275+
if found, _ := totalPayout.Find(globalTypes.Denom); found && !kyveWeight.IsZero() {
278276
kyveAmount := sdk.NewCoins(sdk.NewCoin(globalTypes.Denom, storageCost.Mul(kyveCurrencyUnit).Quo(kyveWeight).TruncateInt()))
279277
bundleReward.UploaderStorageCost = totalPayout.Min(kyveAmount)
280278
totalPayout = totalPayout.Sub(bundleReward.UploaderStorageCost...)
@@ -292,7 +290,7 @@ func (k Keeper) calculatePayouts(ctx sdk.Context, poolId uint64, totalPayout sdk
292290
}
293291
}
294292

295-
kyveCoinFound, kyveCoin = totalPayout.Find(globalTypes.Denom)
293+
kyveCoinFound, kyveCoin := totalPayout.Find(globalTypes.Denom)
296294
remainingCoins := totalPayout
297295
if kyveCoinFound {
298296
remainingCoins = totalPayout.Sub(kyveCoin)

0 commit comments

Comments
 (0)